<?php
$arr = ["one", "two", "three", "four"];
echo count($arr);
?>
count($myArray);
echo count($my_array);
echo sizeof($my_array); // alias
<?php
$names = array("Ankur","Raj","Ram","Suresh");
echo count($names);
$cars=array("Volvo","BMW","Toyota");
echo count($cars);
// test
// https://www.php.net/manual/en/function.count.php
$a = array(1,3,5);
echo count($a);
// -> 3
$cars=array("Volvo","BMW","Toyota");
echo count($cars);
$months = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sep", "Oct" );
// To Printing the array size
echo count($months);