Page 1 of 1

Print an array of list

Posted: Wed Sep 29, 2004 9:19 am
by winsonlee
In my form, i have
<input type='text' name='video_id_$i' value=''>
which contain a list of input text from 0 to 12.
How can i print the value in the input text from 0 to 12 ??

Code: Select all

for($i = 0; $i < 12; $i++) &#123;

                  echo $video_id_$i;	

&#125;

Posted: Wed Sep 29, 2004 9:31 am
by jason
Don't use global variables. Use $_GET and $_POST instead. That way you can just look through the $_GET and $_POST arrays like you would any other array.