1
Hello!
I get the variables like this:
&a25Item1=01&a25Prod1=00123&a25Desc1=ProdutoAcabadoUm
The number will depend on $qtdProd
&a25Item2=01&a25Prod2=00123&a25Desc2=ProdutoAcabadoDois
As in PHP I do the assignment below:
for($i = 0; $i <= $qtdProd ; $i++){
$a25Item i = $_GET['a25Item' i ];
$a25Prod i = $_GET['a25Prod' i ];
$a25Desc i = $_GET['a25Desc' i ];
}
I need $25Item to get 25Item coupled with the counter as if it were assigning:
$a25Item1 = $_GET['a25Item1'];
$a25Item2 = $_GET['a25Item2'];
And so on. I thank you in advance!
Thank you all! It worked like this:
$item = array(); $Prod = array(); $Quan = array(); $desc = array(); $Prec = array(); $subt = array();
for($i = 0; $i <= $nCtd ; $i++){
$item['a25Item'. $i] = $_GET['a25Item'. $i]; $Prod['a25Prod'. $i] = $_GET['a25Prod'. $i]; $Quan['a25Quan'. $i] = $_GET['a25Quan'. $i]; $desc['a25Desc'. $i] = $_GET['a25Desc'. $i]; $Prec['a25Prec'. $i] = $_GET['a25Prec'. $i]; $subt['a25Subt'. $i] = $_GET['a25Subt'. $i];
}
And to get the values:
for($i = 0; $i <= $qtdItem -1 ; $i++){
$item['a25Item'. $i]. $Prod['a25Prod'. $i]. $Quan['a25Quan'. $i]. $desc['a25Desc'. $i]. $Prec['a25Prec'. $i]. $subt['a25Subt'. $i]; }
That way I can ride the way I need to.Thanks! SOLVED!