note 57679 added to language.operators
| From: | php-general at lists dot php dot net | Date: | Tue, 11 Oct 2005 05:47:41 +0000 |
| Subject: | note 57679 added to language.operators | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96809@lists.php.net to get a copy of this message | ||
Modular Arithmetic is accomplished with the percent operator just like in C, perl, and a half-dozen
other languages.
echo 10 % 4;
=>2
There is no need to writea new mod function.
----
Manual Page -- http://www.php.net/manual/en/language.operators.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57679
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57679&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57679&report=yes
Search -- http://master.php.net/manage/user-notes.php