Right to the point ...
I have an array ( $is_anonymous_ary ) that looks like this:
array ( [80] => 1 [57] => 1 [66] => [60] => [90] => 1 )
And another array ( $user_id_ary ) similar to this:
array ( [0] => 80 [1] => 30 [2] => 57 [3] => 89 [4] => 66 [5] => 60 [6] => 90 )
I need to disable the values ββin $user_id_ary based on the first array. So, if the value from $is_anonymous_ary is 1 (true), then take the key from this array, check the $user_id_ary and cancel the keys from $user_id_ary , which had the value from the keys from $is_anonymous_ary .
I complicated the description a bit, this is how I need my final result:
user_id_ary = array( [0] => 30 [1] => 89 [2] => 66 [3] => 60 )
As you can see, all the keys from $is_anonymous_ary that have the value TRUE have disappeared in the second array. which had the keys to the first array as values ββin the second array.
I hope I get it.
Aborted
source share