$products_array[] = array('id' => $products_id,
'name' => $products['products_name'],
'model' => $products['products_model'],
'image' => $products['products_image'],
'price' => $products_price,
'quantity' => $this->contents[$products_id]['qty'],
'weight' => $products['products_weight'],
'final_price' => ($products_price + $this->attributes_price($products_id)),
'tax_class_id' => $products['products_tax_class_id'],
'fr_currencies_id' => $products['fr_currencies_id'],
'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''));
}
}
return $products_array;
i try to understand codes and structure and try to use one of the variable from the array.
what i understood is, array is a storage if datas are called. in order to write select statement all the time, it storages datas and we can use them many times if we need.
the upper side array has 11 variables. this array is in shopping card.php. if i have 5 items in my shopping card, this means 5 columns or lines?
then how can i select $products['products_tax_class_id']'s of 5 items and compare them whether (i have products_tax_class_id's 1, 2, 3) they are bigger than 2 ?