$stmt = $web_dbi->prepare($query);
$stmt->execute();
$result = $stmt->get_result();
$num_of_rows = $result->num_rows;
while($row=mysqli_fetch_array($result)){
$results[] = $row;
}
$randomNumber = mt_rand(0,($num_of_rows-1));
if($results[$randomNumber]['mysql_field']==anothervalue){
...
how do I access, at random, a given element of $results[]? Is this syntax correct in this scenario?