how to count element in php code example Example: count php $cars = array("Volvo","BMW","Toyota"); echo count($cars); // 3