Forum Moderators: coopster

Message Too Old, No Replies

Warning: in_array(): Wrong datatype for second argument in /usr/home/p

         

artie2004

5:55 pm on Mar 15, 2005 (gmt 0)

10+ Year Member



Hi. Does any know why i am getting this:

Warning: in_array(): Wrong datatype for second argument in /usr/home/prescrip/public_html/mdsapp/beta/fedex_handle.php on line 38

I am getting this warning message where i use "in_array()" in my scripts.

We are transferring our application over to a new server but we still have our old server.

My script works fine and i am not getting this message on our old server but on our new server i am getting these warning message. Is this something related to the version of php or php configuration? Thanks.

RonPK

6:25 pm on Mar 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From the manual:
bool in_array ( mixed needle, array haystack [, bool strict])

So the second argument needs to be an array. You're probably using an ordinary string.

The differences between the servers probably are caused by different levels of error reporting. Try running phpinfo() to find out more.