get access to define() constants with dynamic names
| From: | Heiko Mundle | Date: | Wed, 02 Oct 2002 08:47:27 +0000 |
| Subject: | get access to define() constants with dynamic names | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118559@lists.php.net to get a copy of this message | ||
Hi all,
my script knows three different constants
define(G_T_USER, "user_profile"); define(G_T_TEAM, "SAFETOUR_team"); define(G_T_CALL, "SAFETOUR_call");Is it possible to get access to them, if I have the names (USER, TEAM, CALL) in a variable? It must be something like that: aName = "TEAM"; myString = "G_T_$sName"; // myString = "SAFETOUR_team" Any hint to solve this problem would be useful. heiko