Usually, when I have to create a variable on the fly that was created from a FOR loop, I do it like the following:
${"user_id_" . $x}
This would in effect, create variables for as long as the for loop goes, in the format of:
$user_id_1
$user_id_2
$user_id_3
$user_id_4
$user_id_5
My problem is, I need to make sure that these variables are coming from a POSTED form, so I would like to somehow create this variable using the POST check, such as the following:
$_POST['user_id_1']
I cannot find the correct syntax to correctly combine the first example and the $_POST variable. I have tried many combinations of the two, and always receive the following message:
Parse error: parse error, expecting `']''
Does anyone know the syntax to create a dynamic variable that came from a $_POST ?