i have an array and i want to get the count of specific values.
The Structure is as:
Array (
[0] => Array (
[coupon_id] => 350
[coupon_title] => This is the title of coupons
[coupon_code] => ABCD
[coupon_type] => coupon
)
[1] => Array (
[coupon_id] => 350
[coupon_title] => This is the title of coupons
[coupon_code] => ABCD
[coupon_type] => no_coupon
)
)
Now i want to get the count of coupon and no_coupon
I tried by array_value_count but i am getting this can only count STRING and VALUES.
array_value_count(array_column('coupon_type'));