note 10231 added to Variable variables
| From: | guillaume at belliardo dot com | Date: | Wed, 20 Dec 2000 10:42:31 +0000 |
| Subject: | note 10231 added to Variable variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8946@lists.php.net to get a copy of this message | ||
It is possible to create an array using variable variables (but difficult)
take a look at this :
$ss='test[hello]';
if(ereg("([^[]*)\[([^]]*)",$ss,$out)) ${$out[1]}[$out[2]]= "hello world";
echo "view --->" . $test[hello]; #display hello world
pffffuiiiii.
http://www.php.net/manual/language.variables.variable.php