Steven Osborn wrote:
$odd = array("1","3","5","7","9");

if(inarray(substr($var,strlen($var)-1,1),$od)
{
  //haha
}
else
{
  //even
}



How about this

if ($var % 2 == 0) { //it's even
} else { //it's odd
}
--
Online library -- http://pueblonative.110mb.com
126 books and counting.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to