我有一个数组,它具有从 db 获取的三个值。我没有得到每个值的打印。
$sort_query = "SELECT s_uniqid, mar_tot, mar_per FROM `exam_record` WHERE bat=`1314`"
$run_sort = mysql_query($sort_query);
while($selectedvalue = mysql_fetch_assoc($run_sort))
{
$total[] = $selectedvalue;
}
Print_r($total);
上面的查询给了我结果
Array ( [0] => Array ( [s_uniqid] => 1000017 [mar_tot] => 307 [mar_per] => 61.4 ) [1] => Array ( [s_uniqid] => 1000016 [mar_tot] => 288 [mar_per] => 57.6 ) [2] => Array ( [s_uniqid] => 1000015 [mar_tot] => 279 [mar_per] => 55.8 ) [3] => Array ( [s_uniqid] => 1000009 [mar_tot] => 269 [mar_per] => 53.8 ) [4] => Array ( [s_uniqid] => 1000010 [mar_tot] => 269 [mar_per] => 53.8 )
我想打印 s_uniqid、mar_tot 和 mar_per 的单个值...请建议我。