0

Hi any help would be great...

I am moving one site from one host to another and on the current host not getting any errors:...on the new host constantly getting....in_array(): Wrong datatype for second argument in

here is the code that is coming up with an error and the full page is not loading

if((in_array($catID,$thisAppCats)) || (isset($_COOKIE['userID'])))

Again...everything works fine on the current host the page loads fine and the script does what it is suppose to do, but on the new server the page loads only half-way and getting error.....in_array(): Wrong datatype for second argument in on line 288

Any help would be greatly appreciated and not sure why it is working fine on 1 host and not the other...

Regards,

Edited by chuckwilliams11: n/a

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Nyight
0

It seems that $thisAppCats is empty, NULL or.. non-existent.
Debug you $thisAppCats variable. Check its content with print_r or var_dump.
My guess is that this is the case of some domino-problem. You're array isn't populated because of some other error.

0

It seems that $thisAppCats is empty, NULL or.. non-existent.
Debug you $thisAppCats variable. Check its content with print_r or var_dump.
My guess is that this is the case of some domino-problem. You're array isn't populated because of some other error.

I am not understanding why my scripts the exact same scripts work fine on my current host, but getting this error and page loads half-way on the new host...any further insight would be greatly appreciated...

0

I am not understanding why my scripts the exact same scripts work fine on my current host, but getting this error and page loads half-way on the new host...any further insight would be greatly appreciated...

nevvermind gave you the answer and seeing as you posted a single line that has no variable definitions we can't do any more. Perhaps you should research in_array() a little more.

[Links]
http://php.net/manual/en/function.in-array.php

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.