$a = array('a' => 'Apple' ,'b' => 'banana' , 'c' => 'Coconut'); //序列化数组 $s = wddx_serialize_value($a); echo $s; //输出结果(查看输出字符串的源码):<wddxPacket version='1.0'><header/><data><struct><var name='a'><string>Apple</string></var><var name='b'><string>banana</string></var><var name='c'><string>Coconut</string></var></struct></data></wddxPacket> echo '<br /><br />'; //反序列化 $o = wddx_deserialize($s); print_r($o); //输出结果:Array ( [a] => Apple [b] => banana 1 => Coconut )