Ajvanho's avatar
Level 14

in_array() ?

in_array(): Argument #2 must be of type array, string given

Sometimes i dont have an array $item['restricted_countries']), but how to return empty array, instead string?

if ( in_array($geoip_code, $item['restricted_countries']) ) {
						return $item;
					}
0 likes
2 replies

Please or to participate in this conversation.