while ($row = mysqli_fetch_row code example Example: php mysqli fetch single row $row = $result->fetch_assoc();