Selecting variables dynamically?
Posted: Fri Jun 18, 2010 9:17 am
I don't know how best to explain this, but I have a few variables like this:
Now, I want to run a forloop, and select each 'question' variable respectively inside the for loop.. but I don't know how to do this?
The 'counter' variable in the forloop is $j, and I was thinking something along the lines of:
But it doesn't work.. any help?
Code: Select all
$question1, $question2, $question3.. etc.
The 'counter' variable in the forloop is $j, and I was thinking something along the lines of:
Code: Select all
$question$j