note 14701 added to language.operators.php
| From: | marcondes at floripa dot com dot br | Date: | Fri, 10 Aug 2001 13:35:04 +0000 |
| Subject: | note 14701 added to language.operators.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16545@lists.php.net to get a copy of this message | ||
That's obvious tha 1 % 4 return 1 , and 2 % 4 return 2, The a % b operator returns the
remainder of 'a' divided by 'b'. So 1 divide by 4 (thinking in integer values is
ZERO , but remains ONE). You have to remeber that "%" don't return the integer part
of a division , but the remainder.
http://www.php.net/manual/en/language.operators.php