Re: Can"t figure out how to create hierarchical multi array in such
am 26.11.2007 13:30:48 von alexandis
Strange, can't see my post.
First of all - thanks a lot, Micha.
I'm surprised, i haven't expected it was possible to create nested
array elements (subelements) implicitly, via reference :-o
$current = &$current[$item];
I tried to do the same in recursive function...
Re: Can"t figure out how to create hierarchical multi array in such situation
am 26.11.2007 17:17:30 von Michael Fesser
..oO(alexandis@gmail.com)
>I'm surprised, i haven't expected it was possible to create nested
>array elements (subelements) implicitly, via reference :-o
If you want to reference a variable or an array element that doesn't
exist yet, it is created and set to NULL. There's a short note about
this in the manual:
What References Do
http://www.php.net/manual/en/language.references.whatdo.php
See the third note and the example on that page.
Micha
Re: Can"t figure out how to create hierarchical multi array in such
am 27.11.2007 09:24:48 von alexandis
Thanks! One more question. Now i need to create selectlists filled
with data of every corresponding hierarchy class:
I've made recursive function
Re: Can"t figure out how to create hierarchical multi array in such
am 27.11.2007 09:28:58 von alexandis
Ooops, seems like it has nothing to do with pointer, just inner
$result[$i] is being overwritten for every $value item, so just the
last one remains.. :)