Hi everyone, I have a quick question about arrays. 1. User 1 is in a product page and the array is made 2. User 2 is also in a product page and a new array is made for this user The question: Will the first users array be unique to his browser or will his array be overridden once user 2 enters the product page. I know that SESSION are designed to keep an array unique to the users browser but i would like to know how the normal array works. and if the array is overridden what is the point in having arrays over SESSION's or am i just missing something here? Thanks for reading.
Normal arrays only live for as long as the script is running - and that is unique to the page request (not the browser). So if I have requested a page I'll get my version and you will get another.
Hi sarahk, one more thing, what if both users enter the page at the same time will there be any conflict? Thanks for the reply.
Nope, none whatsoever. Unless they're both updating a row in a table in your database, or winning a prize for being the millionth visitor but that comes down to the rules of your application - the arrays will still be independant.