⊗ppPmAFCn 174 of 447 menu

Counting Array Elements in PHP

array_count_values

Given an array:

<?php $arr = ['a', 'b', 'c', 'b', 'a']; ?>

Count how many times each of the letters occurs.

byenru