count key of arrray php code example
Example: php count array elements with specific key
$cnt = count(array_filter($array,function($element) {
return $element['your_key']=='foo';
}));
$cnt = count(array_filter($array,function($element) {
return $element['your_key']=='foo';
}));