Jump to content

Warning: in_array(): Wrong datatype for second argument, WHY!!??


Hyaku_

Recommended Posts

Hi!

I have an array and a variable, when I try to check if variable already exists in the array, I get that error all the time.

$my_var = "Some Var";
$my_arr[0] = "123";
$my_arr[1] = "456";
...

if(in_array($my_var, $my_arr, true)){
       ..
}

any suggestions please? thank you!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.