$sql = "select count(userId) from tblUser";
$result=mysql_query($sql,$link)or die(mysql_error());
$row = mysql_fetch_array($result, MYSQL_NUM);
echo $row[1];
print_r($row); is displaying no of records but whu echo is not working
$sql = "select count(userId) from tblUser";
$result=mysql_query($sql,$link)or die(mysql_error());
$row = mysql_fetch_array($result, MYSQL_NUM);
echo $row[1];
print_r($row); is displaying no of records but whu echo is not working
mysql_fetch_array
is zero counted. You will want to echo $row[0];