|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-12-12 01:46 UTC] me at signpostmarv dot name
Description: ------------ the documentation defines the class_name parameter as: "The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned." However, there is nothing in the documentation which suggests how to construct such a class. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 23:00:01 2026 UTC |
Any class... Example: <?php class foo { public $name; } // connect && select db $rs = mysql_query('SELECT name FROM languages LIMIT 1'); $obj = mysql_fetch_object($rs, 'foo'); var_dump($obj); ?> Output: object(foo)#1 (1) { ["name"]=> string(3) "php" } ---- I'll add one example for that parameter, thanks.