This may sound strange, but here's what I need to do..
I have form generated by a php script that produces a number of text boxes in a form with values. The names of the boxes are text1, text2, text3.... and so on until all the data is displayed.
Once the data is displayed, it can then be updated and a submit button clicked. When the button is clicked, the variables $text1, $text2, $text3... contain values. I need an easy way to loop through these values to process them without having to write code for each variable.
I know the following doesn't work, but I tried it:
The form containing a certian number of text.. boxes is submitted..
for ($x=1;$x<=10;$x++)
{
print "$test$x<br>";
}
Obviously, this will print:
1
2
3
and so on, as the variable $test is empty. What I wanted to do was print the value of the variables $test1, $test2, etc.
I hope I'm clear on this... it's kind of hard to exaplain. I am able to do this in PERL fairly easily, but I can't do it in PHP.
Thanks in advance for your help!