note 31633 deleted from function.ocifetchinto by sixd
| From: | sixd@php.net | Date: | Wed, 18 Nov 2009 22:51:03 +0000 |
| Subject: | note 31633 deleted from function.ocifetchinto by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163055@lists.php.net to get a copy of this message | ||
Note Submitter: russ at zerotech.net
----
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.