Har*_*ant -1 php mysql while-loop
我一直在乱搜索引擎,我试图让while语句运行并以随机顺序回显结果.这是我现在的代码.
if ($numrows > 0) {
while ($row = mysql_fetch_assoc($query)) {
$id = $row['id'];
$title = $row['title'];
$description = $row['description'];
$keywords = $row['keywords'];
$link = $row['link'];
echo "<div id='resultbox'><h3><a href='$link'>$title</a></h3><br><p>$description</p></div>";
}
Run Code Online (Sandbox Code Playgroud)
我理论上需要while语句来完全随机地运行和显示结果.
无论如何这可以做到吗?
谢谢!