note 95567 deleted from language.variables.variable by danbrown

From: Date: Sat, 09 Jan 2010 20:16:18 +0000
Subject: note 95567 deleted from language.variables.variable by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164818@lists.php.net to get a copy of this message
Note Submitter: php at radiantwebsites dot com ---- Expanding upon the comment by php at ianco dot co dot uk: Variable variables allow the creation of non-standard variables names including those that begin with a number. In the following code: <?php // $variable-name = '42'; // You can't do that but you can do this: $a = '42'; $$a = 'non-standard variable name'; echo ${'42'}; echo $$a; ?> both echo statements are valid and output the following string: non-standard variable name

« previous php.notes (#164818) next »