simple question i bet

echo $show_bio | 'true' ? 'false';

i totally forgot how to do the above but i've done it a dozen times.

$show_bio is boolean --- i remember doing something like above where depending on whether it's TRUE  or FALSE it will print the appropriate text.

i don't even know how to search for it online.

so my questions are ---> What is the correct format?

and what would it be under in the PHP manual?

thanks for your help
tony
tjazzvibeAsked:
Who is Participating?
 
RoonaanConnect With a Mentor Commented:
echo $show_bio ? true : false;

-r-
0
 
RoonaanCommented:
Or when you need string output

echo $show_bio ? 'true' : 'false';

-r-
0
 
tjazzvibeAuthor Commented:
duhh!!!! thanks so much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.