RE: [PHP-DB] % operator
| From: | Matthew Moldvan | Date: | Tue, 12 Aug 2003 18:43:30 +0000 |
| Subject: | RE: [PHP-DB] % operator | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29849@lists.php.net to get a copy of this message | ||
There's probably a better way to do this, but to retrieve only the 0.8 from
24/5 try this:
($a/$b)-floor($a/$b)
Regards,
Matt.
-----Original Message-----
From: Alain Barthélemy [mailto:cassandre@bartydeux.be]
Sent: Tuesday, August 12, 2003 5:05 AM
To: php-db
Subject: [PHP-DB] % operator
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