I am building a shopping cart and in my task I have to print out the items that the customer bought. I have tried to store the items in an array $_SESSION['items'] but no success. I have tried this:
$_SESSION['items'][] = $item;
but it did not work.
Please give some advice?
session_startappears before any HTML, otherwise it won't work. Ensure your warnings are enabled so you can see any problems with session initialisation.