I have the following array called $users:
$users [2 elements]
0:
(array) [4 elements]
id: (string) "5"
user_id: (null) 5
email: (string) "[email protected]"
activated: (integer) 0
1:
(array) [4 elements]
id: (string) "6"
user_id: (null) 6
email: (string) "[email protected]"
activated: (integer) 1
I want to display something in HTML only if any of array's elements have activated set to 1. Can be all, can be only one.
I tried with if( in_array(['actived'] == 1, $users)) with no success.
How do I achieve this?