@walker can you explain a bit more what you are trying to achieve?
Is the printed data coming from your session? If so, then you already have the data? Why do you need to foreach it?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I've been worried for a long time how to get to all the data I store in a session. How could I make a foreach to attract data? I need to pull the data into a variable with each array. Thanks.

Please or to participate in this conversation.