note 84626 added to ref.spl
| From: | benny at whitewashing dot de | Date: | Tue, 22 Jul 2008 16:40:14 +0000 |
| Subject: | note 84626 added to ref.spl | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142503@lists.php.net to get a copy of this message | ||
The following construct allows to represent multidimensinal arrays using ArrayObject:
class ArrayMultiObject extends ArrayObject
{
function __construct($array, $flags = 0, $iterator_class = "ArrayIterator")
{
$objects = array();
foreach($array AS $key => $value) {
if(is_array($value)) {
$objects[$key] = new MultiArray($value, $flags, $iterator_class);
} else {
$objects[$key] = $value;
}
}
parent::__construct($objects, $flags, $iterator_class);
}
}
----
Server IP: 217.160.72.57
Probable Submitter: 77.11.21.155
----
Manual Page -- http://www.php.net/manual/en/ref.spl.php
Edit -- https://master.php.net/note/edit/84626
Del: integrated -- https://master.php.net/note/delete/84626/integrated
Del: useless -- https://master.php.net/note/delete/84626/useless
Del: bad code -- https://master.php.net/note/delete/84626/bad+code
Del: spam -- https://master.php.net/note/delete/84626/spam
Del: non-english -- https://master.php.net/note/delete/84626/non-english
Del: in docs -- https://master.php.net/note/delete/84626/in+docs
Del: other reasons-- https://master.php.net/note/delete/84626
Reject -- https://master.php.net/note/reject/84626
Search -- https://master.php.net/manage/user-notes.php