.


Divya

count() Function in PHP


In PHP the count() function is used to count the number of elements in an array.

<!DOCTYPE html>
<html>
<body>
<?php
$students=array("Divya","Sameer","Nirmal","Jerry");
echo count($students);
?>
</body>
</html>
Output : 4

.