We can retrieve data in the result set of MySQL using PHP in four Ways
- mysqli_fetch_row >> Get a result row as an enumerated array
- mysqli_fetch_array >> Fetch a result row as associative and numeric array
- mysqli_fetch_object >> Returns the current row of a result set as an object
- mysqli_fetch_assoc >> Fetch a result row as an associative array
mysqli_fetch_object() is similar to mysqli_fetch_array(), with one difference –
an object is returned instead of an array, which implies that that we can only access the data by the field names, and not by their offsets (numbers are illegal property names).