$a = array('a' => 'Apple' ,'b' => 'banana' , 'c' => 'Coconut'); //序列化数组 $s = json_encode($a); echo $s; //输出结果:{"a":"Apple","b":"banana","c":"Coconut"} echo '<br /><br />'; //反序列化 $o = json_decode($s);