Solved

simple question i bet

Posted on 2006-11-23
3
249 Views
Last Modified: 2008-03-06
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
0
Comment
Question by:tjazzvibe
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 250 total points
ID: 18005929
echo $show_bio ? true : false;

-r-
0
 
LVL 49

Expert Comment

by:Roonaan
ID: 18005932
Or when you need string output

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

-r-
0
 

Author Comment

by:tjazzvibe
ID: 18005933
duhh!!!! thanks so much!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question