note 48028 added to function.settype

From: Date: Thu, 09 Dec 2004 13:17:58 +0000
Subject: note 48028 added to function.settype
Groups: php.notes 
Request: Send a blank email to php-notes+get-81586@lists.php.net to get a copy of this message
/** * @return bool * @param array[byreference] $values * @desc Convert an array or any value to Escalar Object [not tested in large scale] */ function setobject(&$values) { $values = (object) $values; foreach ($values as $tkey => $val) { if (is_array($val)) { setobject($val); $values->$tkey = $val; } } return (bool) $values; } ---- Manual Page -- http://www.php.net/manual/en/function.settype.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48028 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48028&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48028&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48028&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48028&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48028&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48028&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48028&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81586) next »