php - Retrieve POST items with different names -
i'm passing values post file. 1 (or more) of values are: equip1, equip2, equip3, ..., equipn
i'm able know how many equipn have, not know how values. thought works, it's not:
for ($equip_aux=1; $equip_aux<=$number_of_equip; $equip_aux++) { $aux = "'equipamento".$equip."'"; $value = $_post[$aux]; }
any help, please?
i'm able know how many equipn have, not know how values.
here's corrected version of loop:
for ($i = 1; $i <= $number_of_equip; $i++) { $aux = "equip$i"; $value = $_post[$aux]; }
notice can loop trough post values foreach
:
foreach ($_post $p) { ... }
Comments
Post a Comment