I want to display output from mysql using php in random manner. by default whole array will be displayed sequentially.
echo "<table border='1'>
</tr>
<tr>
<th>User ID</th>
<th>User </th>
<th>Site </th>
<th>IP Address</th>
<th>Date</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['userID'] . "</td>";
echo "<td>" . $row['user_name'] . "</td>";
echo "<td>" . $row['site_name'] . "</td>";
echo "<td>" . $row['ip_address'] . "</td>";
echo "<td>" . $row['date'] . "</td>";
echo "</tr>";
}
echo "</table>";
I want to output to be displayed randomly on each access.
i.e. row1 is displayed on first access on top of output. row10 is displayed on 2nd access on top of output. row13 is displayed on 3rd access on top of output.
thanks for suggestions and help.