Can anyone tell me how to separate out the result by even and odd numbers ??
Like I can request my result to show all even/odd numbers only.
Regards
In general the mod operator % will do that.
<?
// try this
$string = $num % 2;
if ($string == 0) { echo "the string contain even number"; ) else (echo "is a odd number")
?>
"select from your_table where id%2=1" returns odd id numbers, "select from your_table where id%2=0" returns even id numbers.
Hope that helps.
---John Holmes...
This was exactly the answer I was looking for!
Google rocks!
-- Derek