PHP mysqli_fetch_object() Function

PHP mysqli_fetch_object() function returns the current row of a result set as an object.

Syntax

mysqli_fetch_object() Function Parameter

ParameterDescription
result :Required parameter. Mention a result set identifier returned by mysqli_query().
class_name :Optional parameter. The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned.
params :Optional parameter. An array of parameters to pass to the constructor for classname objects.

mysqli_fetch_object() Function Return Value

Return Values :Returns an object with string properties that correspond to the fetched row, or FALSE if there are no more rows.

mysqli_fetch_object() Function Example