Thread
:
Adding a # value to the end of another variable
View Single Post
Dec 4th, 2006, 8:56 PM
#
4
kworden
Newbie
Join Date: Dec 2006
Posts: 3
Rep Power:
0
I was able to solve the problem with:
[PHP]
for($i=1; $i<= $numberofgaquestions; $i++ ){
$varname = 'ga' . $i; //create name of variable as a string
echo "The # $i: ". $$varname ."<br>"; // notice $$
}
[/PHP]
kworden
View Public Profile
Find More Posts by kworden