note 20825 added to control-structures.alternative-syntax
| From: | mikkel at hostpartner dot dk | Date: | Wed, 17 Apr 2002 13:17:21 +0000 |
| Subject: | note 20825 added to control-structures.alternative-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29482@lists.php.net to get a copy of this message | ||
A very quick way to write an if else control structure in stead of the common way:
if($a)
echo "a ok";
else
echo "a not ok";
is the following way:
$a?echo "a ok":echo "a not ok";
--
http://www.php.net/manual/en/control-structures.alternative-syntax.php
http://master.php.net/manage/user-notes.php?action=edit+20825
http://master.php.net/manage/user-notes.php?action=delete+20825
http://master.php.net/manage/user-notes.php?action=reject+20825