$array = ['x', 'y', 'z'];
count($array); // output 3
sizeof($array); // output 3
<?php
$vegetables = ["Cabbage", "Carrot", "Lettuce"];
$arrayLength = count($vegetables);
echo $arrayLength; //returns 3
?>
$days = array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
// Printing array size
echo count($days);
echo "<br>";
echo sizeof($days);