Count all the values of an array:


SUBMITTED BY: henry1874w

DATE: June 23, 2017, 9:11 p.m.

FORMAT: Text only

SIZE: 81 Bytes

HITS: 273

  1. <?php
  2. $a=array("A","Cat","Dog","A","Dog");
  3. print_r(array_count_values($a));
  4. ?>

comments powered by Disqus