php array group by value and get quantity
$array = array(
array(
"name"=>"Urus",
"type"=>"SUV",
"brand"=>"Lamborghini"
),
array(
"name"=>"Cayenne",
"type"=>"SUV",
"brand"=>"Porsche"
),
array(
"name"=>"Panamera",
"type"=>"Car",
"brand"=>"Porsche"
),
);
//filter by brand
$arrayFilterQty = array_count_values(array_column($array, "brand"));
/*
Array
(
[Lamborghini] => 1
[Porsche] => 2
)
*/