I want to declare about 100 arrays, like $game1_array, $game2_array ... $game100_array and use them in a calculation. Can I use some sort of look, going from 1 to 100 and declare these in 4 lines rather than declaring them independently?
I tried the following but it didn't work:
for ($i = 1; $i <= 100; $i++) {
$game.'$i'._array = array();
}
Please point out the error.
${'game'.$i.'_array'}actually. But - why?$game1_array , $game2_arrayis a really bad design decision