php - foreach through a session variable -
I would like to repeat on each object in my session variable 'item' is a type of item which is a book that I The book is designed to store information. I have made a count ($ _ session ['item']) which gives 1 so I thought it should be repeated at least once but no luck thank you
foreach ($ _SESSION ['item'] as $ item) {echo test; $ Sql = 'SELECT * item with WHERE item_ID ='. $ Item- & gt; Get_Item_ID; Var_dump ($ sql); }
Why are you archiving objects in a session variable?
The object must be able to serialize and deorize, which you can store in a cookie.
I think $ _SESSION can only store strings and arrays.
>
Comments
Post a Comment