How do i assign Integers only and not real numbers?
| From: | Tom | Date: | Mon, 23 Sep 2002 14:46:37 +0000 |
| Subject: | How do i assign Integers only and not real numbers? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117280@lists.php.net to get a copy of this message | ||
Hi all,
I have a line of code that assigns a new year number: -
$years = $years + ( $themonth / 12 );
but sometimes $years == 1998.0833333333
or
$year == 2002.75
etc...
I cant find anything like a round() or floor() function in PHP so that year
would be 1998 or 2002 only.
Does anyone know what function would do this? Sorry if I`m wasting your
time if its a really obvious one!
thanks in advance,
Tom