i have tried $row[0] alone it works, but not $row[1]. It says like this "Notice: Undefined offset: 1 in C:\xampp\htdocs\t2.php on line 10"
<?php
$c=mysql_connect("localhost","root","");
//db connection
mysql_select_db("niro");
$re=mysql_query("select id from detail where grade >=80 ORDER BY RAND()");
//select who are all have above 80
while($x=mysql_fetch_array($re, MYSQL_BOTH))
{
printf ("%s %s",$x[0],$x[1]."\n");
// i have multiple fields but it says undefined offset : 1.
}
?>
print_r($x);inside the loop