<?php $saonek_array = array( 'product' => array( 1,2,4,6,7,8,9 ), 'user' =>array( 'username'=>'saonek', 'uid'=>'8' ) ); //$arr = array(1,2,3); $arr_str = serialize($saonek_array); setcookie("a",$arr_str); //取出 $arr_str = $_COOKIE['a']; $arr = unserialize($arr_str); print_r($arr); ?>