for example i have Session::instance()->get('orders') which is an array of some arrays:
$first = array('id' = 1, 'name' => 'first', 'price' => 100); $second = array('id' => 2, 'name' => 'second', 'price' => 200); $_SESSION['orders'] = array($first, $second);
but if i use this
Session::instance()->set('orders', array(array('id' => 3, 'name' => 'third', 'price' => 300)));
this will erase first orders (id 1, id 2). so how can i ADD but not ERASE data arrays to session array named 'orders'? array_push or something else?