<?php $str = '"Cat","A","A","A","A"'; $abc = [...json_decode("[$str]"), "A","Cat","Dog","A","Dog"]; print_r(array_count_values($abc));
You have javascript disabled. You will not be able to edit any code.