Hi,

I am trying to automatically display a variable, based on the value of $i 
variable in a loop. For example, I have $q1, $q2, $q3, $q4 variables and so on. 
So what I want is, to display $q1 if $i=1, display $q2 if $i=2 and so on...How 
can I do that? I tried creating a separate new variable to make $new=$q($i) or 
something like that but it gives error. Or I tried doing $new="$q".$i; but this 
time when I echo $new, it only gives the value of $i. 

How can I display the correct $q variable based on the value of $i?

Thanks


      

[Non-text portions of this message have been removed]

Reply via email to