Use "strict checking" with in_array() and 0.

See http://viper-7.com/DWpx92 -- in_array() will always return true when zero is passed as the needle and the values are all strings UNLESS you tell it to use strict checking (pass true for the third argument)