i am trying to make a script that will make a varible 18 times here is what i have something is wrong
for($i=1; $i<=18; $i++){
${"player" . $i . "_number"} = ${$array[player . $i . _number]};
}
it is something with the second half the ${$array[player . $i . _number]};i am trying to get it so it will do:
$player1_number = $array['player1_number'];
$player2_number = $array['player2_number'];
$player3_number = $array['player3_number'];
ect
Thanks!
EDIT
the error i am getting is
Notice: Use of undefined constant player - assumed 'player' in /homepages/27/d193007783/htdocs/maddogmania/application/roster.php on line 22
Notice: Use of undefined constant _number - assumed '_number' in /homepages/27/d193007783/htdocs/maddogmania/application/roster.php on line 22
Notice: Undefined variable: 07 in /homepages/27/d193007783/htdocs/maddogmania/application/roster.php on line 22
the third one where it has the variable 07, 07 is what the $player1_number should be set to if it worked right