Wrong datatype error
Posted: Fri Mar 26, 2010 9:21 am
with this command...
if (array_search($item, $items_ordered_array) === FALSE) do something ;
I get this error:
Warning: array_search() [function.array-search]: Wrong datatype for second argument...
I have read the man page for array_search several times and I don't understand why this won't work. It even tells you to use ===.
Anyone know what is happening, and what to do to make it work?
BTW, it works okay on my test server which has PHP 5.2.4, but not on the internet server I am using which has PHP 5.2.13.. ??????
thanks, Allasso
if (array_search($item, $items_ordered_array) === FALSE) do something ;
I get this error:
Warning: array_search() [function.array-search]: Wrong datatype for second argument...
I have read the man page for array_search several times and I don't understand why this won't work. It even tells you to use ===.
Anyone know what is happening, and what to do to make it work?
BTW, it works okay on my test server which has PHP 5.2.4, but not on the internet server I am using which has PHP 5.2.13.. ??????
thanks, Allasso