chanfuterboy Posted March 12, 2010 Share Posted March 12, 2010 hi, can someone explain me maybe help me out with this problem, the error is Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/awortink/public_html/realgame/gallery_viewer.php on line 56 and in line 56 is (!in_array($_SERVER['REMOTE_ADDR'].$url2, $_SESSION['votes'])? Can someone helpme out on this Quote Link to comment Share on other sites More sharing options...
GKWelding Posted March 12, 2010 Share Posted March 12, 2010 quite simply, $_SESSION['votes'] isn't an array. do a print_r on the $_SESSION['votes'] array key and see what you have there. If it's empty but should be an array then you may need a check around the in_array function like: (is_array($_SESSION['votes']) && !in_array($_SERVER['REMOTE_ADDR'].$url2, $_SESSION['votes'])? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.