I 150 text fields in a form and I want to read the values when the form submitted. Do I have to write like below or there is any other short way...
$a1 = $_POST['a1']
$a2 = $_POST['a2']
$a3 = $_POST['a3']
$a4 = $_POST['a4']
$a5 = $_POST['a5']
----
----
----
$a150 = $_POST['a150']
I have printed all the text fields in form in using for loop in a form with name a1,a2,a3 and so on. I am wrinting as below but not workng
if (isset($_POST['save_exit']))
{
for ($j=1; $j<=150; $j++)
{
${a.$j} = $_POST['a'.$j];
}
echo $a1;
}
but echo is not printing any value..