in_array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

in_array

Post by shiznatix »

in_array is returning this for me

Warning: in_array() [function.in-array]: Wrong datatype for second argument in D:\The Website Folder\public_html\gallery\inc\index.inc.php on line 151

Code: Select all

if (in_array($ids, $prev))
         $prev = true;
if (in_array($ids, $next))
     $next = true;
i turned $prev and $next are both strings

Code: Select all

var_dump($prev);
var_dump($next);

returns

string(1) "0" string(1) "2"
whats up with this?

edit: i am useing PHP 5
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

hahahaha ignore that. i was putting the array as the wrong parameter. please ignore me
Post Reply