The count()
function is used to return the length of the array.
Example
[php]<?php
$cars = array("Volvo", "BMW", "Toyota");
echo count($cars);
?>[/php]
In the above statement, we are using count function which is “count($cars)
” to get the value of arrays in the echo statement.
It will show the following result
3