Variable in variable.

From: Date: Thu, 26 Aug 2010 13:54:49 +0000
Subject: Variable in variable.
Groups: php.general 
Request: Send a blank email to php-general+get-307696@lists.php.net to get a copy of this message
I know that in PHP I can use this: $var1 = "text"; $var2 = '$var1'; 4cho $$var2; So it gives me "text". My question is, is there a way of doing it with constant like this? define("CONST", "text"); $test = "CONST"; echo $$test; So it gives me "text". Thanks in advance. -- João Cândido de Souza Neto

« previous php.general (#307696) next »