看这个例子
<?php
$fruit = array('a' => 'apple', 'b' => 'banana', 'c' => 'cranberry');
reset($fruit);
while (list($key, $val) = each($fruit)) {
echo "$key => $val\n";
}
?>
上例将输出:
a => apple
b => banana
c => cranberry
【 在 datoucong (大头葱) 的大作中提到: 】
: 但是这个id不是for循环出来的
: 是随机产生的啊,另外一个页面又不知道具体的题号是多少
: $query = "select * from prob order by rand() limit n";
: ...................
--
FROM 222.248.237.*