SELECT FROM tab_girls res mysql_query or die while mysql_num_rows res

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
$q = "SELECT * FROM `tab_girls`";
$res = mysql_query($q)
or die($q);
$c = 0;
while($c < mysql_num_rows($res)){
$inf = mysql_fetch_assoc($res);
$g_name[$c] = $inf['g_name'];
$g_img[$c] = $inf['g_img'];
$c++;
}
print_r ($inf);