答案 0 :(得分:0)
对您有帮助并获得更清晰的想法。
<?php
$arr = $arr_history = array("1stQuestion?","2ndQuestion?","3rdQuestion?","4thQuestion?");
for ( $i = 0; $i < count($arr); $i++ )
{
if (empty($arr_history)){ $arr_history = $arr; }
$key = array_rand($arr_history, 1);
$selected = $arr_history[$key];
unset($arr_history[$key]);
echo $selected . PHP_EOL;
}
?>