I would like to loop 5 arrays in post.
What should be the right code to display:
$_POST["fp0"]
$_POST["fp1"]
..
$_POST["fp5"]
in a loop?
$x = 0;
while($x <= 5) {
$fp = ${'_POST["fp'.$x.'"]'};
echo $fp.'<br>';
$x++;
}
I would like to loop 5 arrays in post.
What should be the right code to display:
$_POST["fp0"]
$_POST["fp1"]
..
$_POST["fp5"]
in a loop?
$x = 0;
while($x <= 5) {
$fp = ${'_POST["fp'.$x.'"]'};
echo $fp.'<br>';
$x++;
}
Try this:
$x = 0;
while($x <= 5) {
$fp = $_POST["fp$x"];
echo $fp.'<br>';
$x++;
}