I am trying to fetch all the rows from table 'student'. But it returns only first row in an array. How can I fetch all the rows in an array?
my code is-
<?php
// con ref
$dbCon = mysql_connect("localhost","root","") or die("connection problem".mysql_error());
// db con
mysql_select_db("mysql_db",$dbCon);
$sql = "select * from student ";
$data = mysql_query($sql);
$row = mysql_fetch_array($data);
print_r($row);
?>