Hi, > -----Original Message----- > I am confused by the shorthand "if" notation. > For example I just saw this PHP snippet on another forum
Basically: (condition) ? true : false; Example: $var == "red"; ($var == "red") ? echo 'true' : echo 'false'; You'll find this comes in handy with things like printf and other places like that. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php