velvetInk velvetInk - 1 year ago 100
PHP Question

how to change the value number to a word

I need to display true or false not the number 1

$permission === 1 ? true: false

Answer Source

nearly right:

 $permission= ($permission === 1) ? 'true': 'false';

 echo  $permission;

First you dont make any assignment =
then you have to make a comparison $permission === 1
then you want the string values "true" or "false"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download