Re: Dynamically creating multi-array field

From: Date: Mon, 27 Oct 2008 05:02:03 +0000
Subject: Re: Dynamically creating multi-array field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-282464@lists.php.net to get a copy of this message
Martin Zvarík wrote:
PHP Version 5.2.4 <? $node = '[5][1][]'; ${'tpl'.$node} = 'some text'; print_r($tpl); // null ?> I really don't like to use the EVAL function, but do I have choice?? This sucks.
You should print the results that you are looking for! Are you looking for something like this? Array (
    [5] => Array
        (
            [1] => Array
                (
                    [0] => some text
                )
        )
) how is the $node string being created?

« previous php.general (#282464) next »