I have the following code:
include $_SERVER['DOCUMENT_ROOT'].'/include/conn.php'; 
$query = "SELECT title FROM news_event";
$result = $mysqli->query($query);
$row = $result->fetch_array(MYSQLI_BOTH);
$row_cnt = $result->num_rows;
$result->free();
$mysqli->close();
This is fine if there is only one result as I can just echo $row['title'] but if there are lots of results, how do I get this to loop through and print every row?
I'm sure this is really simple but I'm just not sure what I need to search for in Google.
I'm looking for a mysqli equivalent of this:
while( $row = mysql_fetch_array($result) )
{
    echo $row['FirstName'] . " " . $row['LastName'];
    echo "<br />";
}
 
     
     
     
     
     
    