All. I am sure that someone may have asked similar thing but I failed to find the related thread. I have the following array of associative array
May I know how I can extract an array of data with only [type] => Beverage ?
Array (
[0] => Array (
[id] => 1
[prod_name] => Coffee
[type] => Beverage
)
[1] => Array (
[id] => 2
[prod_name] => Vegetable
[type] => Food
)
[2] => Array (
[id] => 3
[prod_name] => Orange Juice
[type] => Beverage
)
)
I have looked at the function array filter but still cannot figure the answer out. Thanks.