thats very easy to do hofan. The way justin would set it up would be
CREATE TABLE cart (
cart_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (cart_id)
and for your dynamic data, where you could have an unlimited amount of fields you would put it in another table like this one
CREATE TABLE cart_data (
cart_data_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
cart_id INT UNSIGNED,
so as your array gets bigger you can keep adding more and more values into the cart_data table, when you want to get all the rows of the array back from the database you would query with a left join statement like this
SELECT * FROM cart LEFT JOIN cart_data USING(cart_id) WHERE cart_id = ?
Then you can loop through and restore your array.
The first table would be for static data or data related to the current user, while the second table is only there to fulfill the unknown number of values in your array. If all you are storing is an array, then you can forgo the first table and just use the second one.