Answers for "get count in php"

PHP
30

php length of array

<?php
	$arr = ["one", "two", "three", "four"];
	echo count($arr);
  ?>
Posted by: Guest on December-29-2019
1

get count sql query in php

$result=mysql_query("SELECT count(*) as total from Students");
$data=mysql_fetch_assoc($result);
echo $data['total'];
Posted by: Guest on February-18-2021
2

count php

$cars = array("Volvo","BMW","Toyota");
echo count($cars); // 3
Posted by: Guest on May-11-2021
3

php array lenght

<?php
$cars=array("Volvo","BMW","Toyota");
echo count($cars);
?>
Posted by: Guest on July-28-2020

Browse Popular Code Answers by Language