Telling av array-elementer i PHP
array_count_valuesЗадание 1
Gitt et array:
php<?php
$arr = ['a', 'b', 'c', 'b', 'a'];
?>
Tell hvor mange ganger hver av bokstavene forekommer.
array_count_valuesGitt et array:
php<?php
$arr = ['a', 'b', 'c', 'b', 'a'];
?>
Tell hvor mange ganger hver av bokstavene forekommer.