Re: Odds and Evens!

From: Date: Tue, 22 Aug 2000 14:37:12 +0000
Subject: Re: Odds and Evens!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12952@lists.php.net to get a copy of this message
Try using mod (%) http://www.php.net/manual/language.operators.php if $a % 2 == 0, it's even. Otherwise it's odd. ----- Original Message ----- From: "Chris Murley" <murley@appindex.net> To: <php-general@lists.php.net> Sent: Tuesday, August 22, 2000 9:16 AM Subject: [PHP] Odds and Evens! > Does anyone have a function that you pass a number to, and that would > return odd or even depeneding on what the number is? > > > > Thanks! > > Chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#12952) next »