Serialize the array on the local page, $_SESSION['data'] = serialize($commoditycount) and obtain it through unserialization of the array on another page,
$data = unserialize($_SESSION['data']); The values of key and value can be obtained by traversing,
1. while(list($key,$value)=each($data)){
2.
3. echo "$key : $value
";}