Solved

simple question i bet

Posted on 2006-11-23
3
226 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
Comment Utility
echo $show_bio ? true : false;

-r-
0
 
LVL 49

Expert Comment

by:Roonaan
Comment Utility
Or when you need string output

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

-r-
0
 

Author Comment

by:tjazzvibe
Comment Utility
duhh!!!! thanks so much!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now