To pull the first one from the array, or return false
:
current(array_filter($myArray, function($element) { ... }))
More info on current() here.
To pull the first one from the array, or return false
:
current(array_filter($myArray, function($element) { ... }))
More info on current() here.