Re: % operator
| From: | Doug Thompson | Date: | Tue, 12 Aug 2003 09:27:47 +0000 |
| Subject: | Re: % operator | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29841@lists.php.net to get a copy of this message | ||
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
It is a very easy operator to use.
Doug
On Tue, 12 Aug 2003 11:04:39 +0200, Alain Barthélemy wrote:
>Hello,
>
>If you have
>
>$a = 24;
>$b = 5;
>
>and
>
>$c = $a/$b;
>
>===> $c = 4.8
>
>To retrieve the .8 (reste in french) I saw instruction:
>
>$a%$b
>
>Where can I find a manual for this '%' operator? Of course I already looked in
>all the Php manuals (operators, etc ...).
>
>Thanks,
>
>
>
>--
>Alain Barthélemy
>cassandre@bartydeux.be
>http://bartydeux.be
>Linux User #315631
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>