I haven’t use PHP for some time, and I need some help to create some lines of code. I wrote this line of code some years ago for a website
array_push($_SESSION['buildingsAlreadySeenList'],$id);
This is my problem, I just want to iterate through the array and put the first value at index 0 to $buildingId and then next time put the value of index 1 to $buildingId with som While loop i guess? I know it’s easy, but sadly I haven’t used PHP for some time! Preciate the help! Thanks!
Use foreach()
Update
To check if the array is empty count the variables