The mysqli_fetch_all() function fetches all result rows and returns the result-set as an associative array, a numeric array, or both.
mysqli_fetch_all(result,resulttype);