PHP Function Tutorial
Close ×
PHP Function Home
PHP echo() function
PHP isset() function
PHP count() function
PHP rand() function
PHP mt_rand() Function
PHP strcmp() function
PHP trim() function
PHP substr() function
PHP strlen() function
PHP mail() function
PHP extract() function
PHP addcslashes() function
PHP bin2hex() function
PHP htmlentities() function
PHP strrev() function
PHP strtoupper() function
PHP strtolower() function
PHP mysqli_affected_rows() function
PHP date_diff() function
PHP round() function
Math Function
PHP atan() function
PHP atan2() function
PHP atanh() function
PHP asine() function
PHP asinh() function
PHP asinh() function
PHP basecovert() function
PHP bindec() function
PHP abs() function
PHP acosh() function
PHP acos() function
Home
PHP Project
PHP Function
SQL
.
X
Java Project
Java Programming
SQL
Divya
count() Function in PHP
❮ Previous
Next ❯
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
❮ Previous
Next ❯
.