note 81779 added to language.operators
| From: | janturon at email dot cz | Date: | Thu, 13 Mar 2008 08:27:45 +0000 |
| Subject: | note 81779 added to language.operators | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137002@lists.php.net to get a copy of this message | ||
Thanks to phpnet dot 20 dot dpnsubs at xoxy dot net for this, it saved me a lot of time. The
brackets sucks, but you can have fun with them - make smileys valid code :o)
$a = 2;
echo (
$a == 1 ? 'one' :(
$a == 2 ? 'two' :(
$a == 3 ? 'three' :(
$a == 4 ? 'four'
:0) ) )
);
----
Server IP: 69.147.83.197
Probable Submitter: 82.117.140.240
----
Manual Page -- http://www.php.net/manual/en/language.operators.php
Edit -- https://master.php.net/note/edit/81779
Del: integrated -- https://master.php.net/note/delete/81779/integrated
Del: useless -- https://master.php.net/note/delete/81779/useless
Del: bad code -- https://master.php.net/note/delete/81779/bad+code
Del: spam -- https://master.php.net/note/delete/81779/spam
Del: non-english -- https://master.php.net/note/delete/81779/non-english
Del: in docs -- https://master.php.net/note/delete/81779/in+docs
Del: other reasons-- https://master.php.net/note/delete/81779
Reject -- https://master.php.net/note/reject/81779
Search -- https://master.php.net/manage/user-notes.php