note 56779 added to function.echo
| From: | lorenpr at gmail dot com | Date: | Thu, 15 Sep 2005 04:12:28 +0000 |
| Subject: | note 56779 added to function.echo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95195@lists.php.net to get a copy of this message | ||
I hope this ternary thing isn't overkill. Last thing - I would just like to make you aware of
the side effect when you do this statement,
echo $some_var ? print 'true': print 'false';
The result would be either 'true1' or 'false1', depending on whether $some_var
is true or false respectively. This happens because of what I mentioned earlier. Figure it out.
----
Manual Page -- http://www.php.net/manual/en/function.echo.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56779
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56779&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56779&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56779&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56779&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56779&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56779&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56779&report=yes
Search -- http://master.php.net/manage/user-notes.php