I am trying to create a loop statement for some of my code and am wondering how I can put a variable within another variable.
For example:
<?php
$j=1;
while ($j <= 9): {
$f$jfname = $_SESSION['F$jFirstName'];
$f$jmi = $_SESSION['F$jMI'];
$f$jlname = $_SESSION['F$jLastName'];
}
$j++; endwhile;
?>
Where the goal is to have the j variable increase during the loop and change the values as:
$f1fname $f2fname $f3fname
and so on.
Any ideas?
EDIT
Yes I am aware that my INITIAL form was flawed in the way I captured information (as individual variables as opposed to arrays) so any answer telling me that SESSION is an array and so on is irrelevant because I cannot call any variables implicitly from the SESSION variables I created (without a line by line reference) All variable stored in SESSION are completely unique and independent of each other.