I am retrieving the rows of my query as such:
$rows = mysqli_fetch_all($result, MYSQLI_ASSOC);
How can I do:
(PSEUDO CODE)
$rows = mysqli_fetch_assoc($result, MYSQLI_ASSOC);
Use the mysqli_fetch_assoc function.
And the use the foreach as:
foreach($rows as $column => $value) { echo $column." = ".$value; }
Note: You can also use foreach with mysqli_fetch_all.
foreach
mysqli_fetch_all