Is there a way to use multiple variables inside a $_GET, $_POST or $_SESSION declaration?
For example: $_SESSION['session_array{$i}'].
$i being a counter variable so that each array I save has a different name.
I need this for saving multiple associative arrays in the $_SESSION, if there is another way this could be done this would also be helpful.
You can (for
$_POST, $_GET, $_SESSION, $_REQUEST, respectively) doBut, you probably are looking for, or should rather do
Also, don’t forget to use
session_start()before trying to use session variables.