note 16541 deleted from control-structures.alternative-syntax by jimw

From: Date: Sat, 03 Nov 2001 18:24:55 +0000
Subject: note 16541 deleted from control-structures.alternative-syntax by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20389@lists.php.net to get a copy of this message
For testing a variable with only 2 possible control path values here is one line syntax, ($test) ? $result = "something" : $result ="nothing"; which is the same as if ($test) $result = "something

« previous php.notes (#20389) next »