> I am looking for a mod() function in PHP but unfortunately I am unable to find one. > Please help...
As in modulus?
if ($foo % 2 == 0) {
// if there's no remainder after dividing by 2
}
if ($foo % 5 != 0) {
// if there is a remainder after dividing by 5
}
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

