note 48213 added to control-structures.else
| From: | php-general at lists dot php dot net | Date: | Wed, 15 Dec 2004 15:41:24 +0000 |
| Subject: | note 48213 added to control-structures.else | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-81821@lists.php.net to get a copy of this message | ||
cgeng, the negative value is intentional:
echo "You have $i message".($i-1?"s":"")." in your
mailbox.\n";
With one and only one message, this prints "You have 1 message in your mailbox." With any
and all other values, it prints "You have # messages in your mailbox." This is
grammatically correct for all values of $i.
----
Manual Page -- http://www.php.net/manual/en/control-structures.else.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48213
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48213&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48213&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48213&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48213&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48213&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48213&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48213&report=yes
Search -- http://master.php.net/manage/user-notes.php