I want to store a database table in a cookie (for example, to store items in a shopping cart for a user that is not logged in).
My problem is, say the table has a list of items where I need to store an ID and amount for each item.
What is a good data structure I could use for PHP to store the data in the cookie?