if I have a query that looks like this in php…
JavaScript
x
if ($result3 = $connuser->query("SELECT * FROM devices WHERE uid='".$username."'")){
}
How can I turn $result3 into an array? Also, separate question, I tried doing
JavaScript
echo $result3;
but it doesn’t work. Is there a way to view $result3 so I can see what it looks like?
Advertisement
Answer
You can do:
JavaScript
$rows = [];
while($row = mysqli_fetch_array($result3))
{
$rows[] = $row;
}