Solved

simple question i bet

Posted on 2006-11-23
3
266 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

737 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