I hope that someone will be kind enough to help me on this. I have some variables on a page that are dynamic. I can run this to view the variables (from a POST) for testing:
Foreach($HTTP_POST_VARS as $key=>$value) echo("$key => $value<br>"); and the results are: -----results----- team_number_1 => 5 sub1_1 => 10 sub2_1 => B team_number_2 => 7 sub1_2 => 10 sub2_2 => B team_number_3 => 29 sub1_3 => 10 sub2_3 => B team_number_4 => 23 sub1_4 => 10 sub2_4 => B team_number_5 => 8 sub1_5 => 10 sub2_5 => B team_number_6 => 20 sub1_6 => 10 sub2_6 => B team_number_7 => 9 sub1_7 => 10 sub2_7 => B team_number_8 => 11 sub1_8 => 10 sub2_8 => B i => 8 action => Update -----end results----- 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>"; } } The above gives me these results: -------results------ i = 8 team_number 1 sub1_1 = 1 sub2_1 = 1 sub3_1 = 1 sub4_1 = 1 sub5_1 = 1 team_number 2 sub1_2 = 2 sub2_2 = 2 sub3_2 = 2 sub4_2 = 2 sub5_2 = 2 team_number 3 sub1_3 = 3 sub2_3 = 3 sub3_3 = 3 sub4_3 = 3 sub5_3 = 3 team_number 4 sub1_4 = 4 sub2_4 = 4 sub3_4 = 4 sub4_4 = 4 sub5_4 = 4 team_number 5 sub1_5 = 5 sub2_5 = 5 sub3_5 = 5 sub4_5 = 5 sub5_5 = 5 team_number 6 sub1_6 = 6 sub2_6 = 6 sub3_6 = 6 sub4_6 = 6 sub5_6 = 6 team_number 7 sub1_7 = 7 sub2_7 = 7 sub3_7 = 7 sub4_7 = 7 sub5_7 = 7 team_number 8 sub1_8 = 8 sub2_8 = 8 sub3_8 = 8 sub4_8 = 8 sub5_8 = 8 ----end results---- Thank You in Advance Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php