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,

Member Avatar for nevvermind

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.

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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.