php result count code example
Example 1: get count sql query in php
$result=mysql_query("SELECT count(*) as total from Students");
$data=mysql_fetch_assoc($result);
echo $data['total'];
Example 2: count php
$cars = array("Volvo","BMW","Toyota");
echo count($cars); // 3