Is there some type of select function of sorts to create a new array selecting only certain elements with sub elements matching cases? For example, I would only like to have an array containing where [type] is “A”, so have a final array only containing [1] and [2].
[1]
[type] => A
[month] => January
[2]
[type] => A
[month] => February
[3]
[type] => B
[month] => March
Thanks!
You can do that more concisely with an anonymous function if you have PHP 5.4.