function generateRandomQuestion(){
$rs=$this->getAllQuestions();
$arr=array();
for($i=0;$i<mysql_num_rows($rs);$i++){
$row=mysql_fetch_array($rs);
array_push($arr,$row["QuestionId"]);
}
$Max=mysql_num_rows($rs);
for($i=0;$i<$Max;$i++){
srand ((float) microtime() * 10000000);
$questionList= array_rand ($arr,$Max);
}
for($i=0;$i<$Max;$i++){
echo "QList : ".$questionList[$i]."<BR>";
}
return $questionList;
}
I dont know why i reload it many times the result doesnt change.It's still the same
QList : 8
QList : 2
QList : 10
QList : 1
QList : 11
QList : 5
QList : 9
QList : 4
QList : 3
QList : 6
QList : 0
QList : 7