Good morning,
I want to create an array dynamically in a for loop - then make that array a session variable and was wondering if it can be done.
Here is what I am doing in a nutshell.
Someone comes to my site and buys tickets and each of these tickets have a unique number.
In a for loop, I am assigning ticket numbers then incrementing it by one as long as it falls within the quantity purchased.
I have a loop...
for ($i = 1; $i <= Quantity; $i++) {
...various insert statements....
$assigned_ticket++;
}
I would like to make an array of the assigned tickets then make the array a session variable to pass to other pages. Can this be done? If so, can you show an example please. I've been reading, searching, and typing for hours and am ready to give up. Thank you.