I am using values to be submitted to the next page through post method. The input type fields have dynamic names which are created like this name="fob-$id". Now when submitted through post, there are 4 – 5 variables such as fob-89, fob-29, fob-65 etc…
How can i assign these values to a new variable ???
NOTE: I know what numbers will be attached with the fob, so it will not be a problem, the only problem i am facing is about how to assign these values to a variable..
$fob=$_POST['fob-$id'];
Above code is not working.
Thanks
As per the comment updates, assuming
$idis an integer gotten from the$_SESSIONvar, you can store it to an array: