note 31633 added to function.ocifetchinto

From: Date: Mon, 28 Apr 2003 18:22:59 +0000
Subject: note 31633 added to function.ocifetchinto
Groups: php.notes 
Request: Send a blank email to php-notes+get-47219@lists.php.net to get a copy of this message
In response to an easy way to return an object instead of an array, simply take the array returned, for example: ocifetchinto($stmt, $myarray, OCI_ASSOC); $myobject = (object)$myarray; It will automatically cast into stdClass, and assign a member for each key in $myarray. You can cast like this with anything, including from object back to array. -- http://www.php.net/manual/en/function.ocifetchinto.php http://master.php.net/manage/user-notes.php?action=edit+31633 http://master.php.net/manage/user-notes.php?action=delete+31633 http://master.php.net/manage/user-notes.php?action=reject+31633

« previous php.notes (#47219) next »