JonDecagon
-
Posts
1 -
Joined
-
Last visited
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
How do you use sessions so that an array becomes the new array when page refreshes?
in PHP Coding Help
Posted
I'm trying to create a code that moves a string array A B C D E around based on the amount specified entered into a field in a form and the direction which is also entered into the form. What I want to do is to make the $newarray equal $array when the page is refreshed and the submit button is hit again. That way A B C D E when moved LEFT by 1 will be B C D E A and then if RIGHT and 2 is entered, you will see E A B C D. I've been struggling to get session working and just ended up more lost. Here is the code I got so far. I would greatly appreciate any help with this.