Variable naming

From: Date: Tue, 25 Sep 2001 16:15:01 +0000
Subject: Variable naming
Groups: php.general 
Request: Send a blank email to php-general+get-68750@lists.php.net to get a copy of this message
I want to use the value of a variable in a variable name. For instance: $id = 1; $sql_$id = "hey"; //set variable $sql_1 to hey print $sql_1; //should print hey I have looked high and low on how to do this. My first idea was eval but I can't seem to get that to work in this instance. Any ideas? I'm sure it is possible and easy but I just can't figure out how to do this in php. Thanks -- Kyle

« previous php.general (#68750) next »