RE: [PHP] Mod function

From: Date: Fri, 18 Jan 2002 11:10:42 +0000
Subject: RE: [PHP] Mod function
Groups: php.general 
Request: Send a blank email to php-general+get-81064@lists.php.net to get a copy of this message
> 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

« previous php.general (#81064) next »