I am trying to create a loop that creates variables using the increment/count number:
$names = 4;
for($it=0;$it<$names;$it++){
$NAME{$it} = $_REQUEST['NAME'.$it.''];
$SURNAME{$it} = $_REQUEST['SURNAME'.$it.''];
$AGE{$it} = $_REQUEST['AGE'.$it.''];
}
My issue is that instead of getting $NAME0, $NAME1 etc, I am getting an array (so $NAME[0], $NAME[1] and so on).
How would I use the loop to get all the info in $NAME0, $NAME1, $NAME2, $SURNAME1, $SURNAME2 $SURNAME3, $AGE1, $AGE2, $AGE3?
Thanks :)