Counting Array Elements in PHP
array_count_valuesЗадание 1
Given an array:
php<?php
$arr = ['a', 'b', 'c', 'b', 'a'];
?>
Count how many times each of the letters occurs.
array_count_valuesGiven an array:
php<?php
$arr = ['a', 'b', 'c', 'b', 'a'];
?>
Count how many times each of the letters occurs.