I did something similar to this recently, so I will try and explain how I did it as best I can.
Apologies for any errors / omissions, so please post back for clarification...
If your products are priced based upon size, then you could create 2 new tables for your database, I'll call them tblsize and tblprice, to allow you to create a many to many relationship between items and prices
tblsize is essentially a reference table and would have the following fields...
SizeID
Description
tblprice, which would contain all of the item prices could have the following fields...
ItemID
SizeID
Price
Where ItemID is the same as the itemID in your items table and SizeID is as in tblsize.
When populated, this table will give you several sizes and prices per product.
On your item detail page, you can query your price look up table which is filtered using sizeid and itemid variables posted from the add to cart form.
Then you can pass the price returned from the query into the cart array.
Hope this helps