Print an array of list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
winsonlee
Forum Commoner
Posts: 76
Joined: Thu Dec 11, 2003 8:49 pm

Print an array of list

Post 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;
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post 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.
Post Reply