PDOStatement::fetchObject — Gets the next row and returns it as an object. (PHP 5 >= 5.1.0, PECL pdo >= 0.2.4)
mixed PDOStatement::fetchObject ([ string $class_name = "stdClass" [, array $ctor_args ]] )
Gets the next row and returns it as an object. This function (method) is an alternative to using PDO::FETCH_CLASS or PDO::FETCH_OBJ style PDOStatement::fetch().
class_name
Create the name of the class.
ctor_args
The elements of this array are passed to the constructor.
Returns an instance of the required class with the property name corresponding to the column name, or FALSE on failure.