77 of 110 menu

The Number of Elements in an Array in PHP

The number of elements in an array in PHP can be found using the count function. See the example:

<?php $arr = ['a', 'b', 'c']; echo count($arr); ?>

Code execution result:

3
English
БеларускаяEspañolРусский
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline