As an FYI, you may want to read this comment found on http://php.net/manual/en/function.in-array.php
Be aware of oddities when dealing with 0 (zero) values in an array...
$array = array('testing',0,'name');
//this will return true
//this will return false
var_dump(in_array('foo', $array, TRUE));
It seems in non strict mode, the 0 value in the array is evaluating to boolean FALSE and in_array returns TRUE. Use strict mode to work around this peculiarity.
This only seems to occur when there is an integer 0 in the array. A string '0' will return FALSE for the first test above (at least in 5.2.6).
If you ever have the value 0 in your array, you could get unwanted results.... so be sure to test for that.