|
| USING THE count() FUNCTION AND sizeof() FUNCTION TO FIND THE SIZE OF AN ARRAY
Both the count() and sizeof() function can be used to find out the number of elements in an array.
Example:
$colors=array('blue', 'red', 'green');
echo count($colors); // outputs 3
echo sizeof($colors); // outputs 3
See also:
|
|