Page 1 of 1

whole number division

Posted: Wed Sep 21, 2005 8:11 am
by snx
hi, i am having trouble finding information about whole number division with php:


assuming 77/10:

floor(76/10) = 7
the remainder: 76%10=6

that seems right to me but just want to clarify

thx
j.

Posted: Wed Sep 21, 2005 8:19 am
by feyd
yeah...that's how it's done for small integers... you could use bcmath or gmp, if your server supports them, for larger integer math...