Hey
I'm trying to check sessionbasket before buying (and check if database store includes same units from session )
    foreach($_SESSION['cart'] AS $key => $qty){
  $sizes_id[] = $qty['units'];
 }
output from session:
Array(
    [0] => 1 (units)
    [1] => 5 (units)
)
lets assume that there is max 2 units in db, and 5 in session. I need to loop through the database and check if session is equal session output. if true, insert into db else, redirect front