Re: % operator
| From: | Phil Driscoll | Date: | Tue, 12 Aug 2003 09:39:39 +0000 |
| Subject: | Re: % operator | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29842@lists.php.net to get a copy of this message | ||
On Tuesday 12 August 2003 10:27 am, Doug Thompson wrote:
> The "%" is called the Modulus operator. It is very briefly explained in
> the PHP manual in table 11-2.
>
> In your example, $mod = $a % $b ==> $mod = 0.8
The modulus is the remainder after division hence 5 into 24 goes 3 times with
a remainder of 4, hence
$mod=25%4
gives $mod=4
Cheers
--
Phil Driscoll