Total Newbie - concatenating variables.

From: Date: Sat, 10 Nov 2001 15:19:50 +0000
Subject: Total Newbie - concatenating variables.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74101@lists.php.net to get a copy of this message
Hi, This is my first foray into PHP (coming from a VB, ASP background). What I am trying to do should be ridiculously easy, but for some reason I can't figure out how to do this. I have a form that builds a dynamic number of text boxes in a loop: for($i=0;$i<$count;$i++) { print("<input type=text name=item" . $i . ">"); } that works fine. I end up with a number of textboxes named "item0", "item1", "item2" and so on...When I submit the form, I pass over the $count value and I want to loop through the count so that I can ge the value for each textbox by building the textbox name dynamically. For example: for($i=0;$i<$count;$i++) { print("$item . $i"); } Trying to print the value of "$item0", "$item1", etc...Obviously this doesn't work. What am I overlooking here? Many thanks in advance, Dave

« previous php.general (#74101) next »