Imagine I have this array:
Array
(
[0] => Array
(
[email] => [email protected]
[name] => a
)
[1] => Array
(
[email] => [email protected]
[name] => b
)
)
I use this code to check if my email exists in this multi array:
in_array($user->user_email, array_column($array, 'email'))
Now, my question is: How can I get the value of the parameter 'name', where the email is matching my variable. So if my $user->user_email is equal to '[email protected]' i need the name value, which is 'a'. Is it possible in php?