What does it mean?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
vargadanis
Forum Contributor
Posts: 158
Joined: Sun Jun 01, 2008 3:48 am
Contact:

What does it mean?

Post by vargadanis »

Hi!

I have met some code snippet which seems similar to that of C but I cannot interpret it for myself. What is it?

$var = expr ? TRUE : FALSE
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: What does it mean?

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
User avatar
vargadanis
Forum Contributor
Posts: 158
Joined: Sun Jun 01, 2008 3:48 am
Contact:

Re: What does it mean?

Post by vargadanis »

I have copied this from the website you posted:

Code: Select all

variable = (condition) ? value-if-true : value-if-false;
I think it is quite self-explanatory. Thanx for the link...
Post Reply