> -----Original Message----- > From: Steve Buehler [mailto:[EMAIL PROTECTED]] > Sent: 13 June 2002 15:54 > > I hope that someone will be kind enough to help me on this.
<snip> > I want to do something like the following, but it does not work: > testinput(); > function testinput(){ > GLOBAL $HTTP_POST_VARS; > extract($HTTP_POST_VARS); > echo "i = $i<br>"; > for($c=1;$c<=$i;$c++){ > echo "team_number $team_number_$c<br>"; > echo "sub1_$c = $sub1_$c<br>"; > echo "sub2_$c = $sub2_$c<br>"; > echo "sub3_$c = $sub3_$c<br>"; > echo "sub4_$c = $sub4_$c<br>"; > echo "sub5_$c = $sub5_$c<br>"; > } > } I don't think you can do this directly in a single string (at least, I haven't been able to!). However, either of the following formats should work for you: echo "sub1_$c = " . ${"sub1_$c"} . '<br>'; echo "sub1_$c = " . ${'sub1_'.$c} . '<br>'; But -- erm -- can I just ask why you're not using arrays, which might make life somewhat easier?! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php