I have been answered in another question with the following code:
$user_id_ary = array_filter($user_id_ary, function($var) use ($is_anonymous_ary) {
return !(isset($is_anonymous_ary[$var]) && $is_anonymous_ary[$var] === true);
});
It works awesomely on my localhost, which is running on PHP 5.3, means, it supports closures (aka Anonymous functions), but it doesn’t work on my online hosting which is running on PHP 5.2.
Is there an alternative version of that code that works prior PHP 5.3?
Thanks.
There’s an easier solution for your original task (by easier I mean not involving callback function):