mysqli fetch_all() not a valid function?

This function is available since PHP 5.3.0. Possibly your version is older. Use fetch_assoc() instead.

while ($row = $result->fetch_assoc()) {
    // do what you need.
}

Leave a Comment