PHP Array Length
To count the array length
in PHP, use the count function.
See the example:
<?php
$arr = ['one', 'two', 'three'];
echo count($arr);
?>
Code execution result:
3
See Also
-
lesson
string length in PHP
To count the array length
in PHP, use the count function.
See the example:
<?php
$arr = ['one', 'two', 'three'];
echo count($arr);
?>
Code execution result:
3