I am totally stuck! I've been trying all day to make the following work: I have a POST collection that contains some inputboxes. These inputboxes have a name like: root|element1|subelement1 I split this name into an array list and that gives me: $elements[0] = root $elements[1] = element1 etc Now I want to create an array list that looks like this from the $elements list: Array ( [root] => Array ( [element1] => Array ( [subelement1] => inputbox value ) ) ) Basically, what I want to do is: $arrTest['root']['element1']['subelement1'] = 'inputbox value'; I can't seem to create an array dynamically. I need to do it dynamically because I don't know how many elements will be returned from the inputbox name. Hope this explains it and someone can help me...
The trick does actually lay in your HTML form. <input type="text" name="root[element][subelement]" /> HTML: