Richard Davey wrote:
Hi Stut,
Tuesday, June 19, 2007, 1:49:53 PM, you wrote:
Very nice, thank you. I was hoping there would be a way to do it
without resorting to eval(), but if even you can't figure out how, I'm
not going to waste any more time trying to either :)
You probably could by breaking it into each part and then using a loop
to descend to the right place, but I don't think that's going to be any
better than using eval.
I was wondering about doing something like this:
Recurse through $_POST, grabbing all of the keys, and then building a
string from them, something like:
icecream_batch2_flavours
and then storing the value of 'flavours' in a new array with the above
as the key.
Then I could manipulate the form input name:
name="icecream[batch2][flavours][]"
or
name="icecream['batch2']['flavours'][]"
To resemble the above key relatively simply.
Not quite what I was thinking of.
More like this: http://dev.stut.net/php/davey2.php
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php