Solved

simple question i bet

Posted on 2006-11-23
3
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
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 i…
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 and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

695 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