note 23360 deleted from language.operators.arithmetic by sniper
| From: | sniper@php.net | Date: | Mon, 13 Oct 2003 00:07:45 +0000 |
| Subject: | note 23360 deleted from language.operators.arithmetic by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58379@lists.php.net to get a copy of this message | ||
Note Submitter: armlis@free.fr
----
to get a DIV function as $result= $x div $y, you can use this way :
$result=$x / $y;
$result=explode(".",$result);
$result=$result[0];
you can add this test to add the modulus :
if (($x % $y)>0) $result+=1;