我有一些想要序列化的复杂数据。
当我试图反序列化它时,我得到的只是:
bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false)...etc...
这是序列化的字符串:
a:6:{i:0;a:10:{s:6:"ItemID";s:1:"1";s:11:"ItemEventID";s:1:"1";s:7:"ItemCat";s:3:"REG";s:8:"ItemName";s:21:"Inscrição Masculina";s:8:"ItemCost";s:4:"9.00";s:12:"ItemCurrency";s:3:"EUR";s:8:"ItemFree";s:1:"N";s:9:"ItemStart";s:9:"2013-1-12";s:7:"ItemEnd";s:8:"2013-4-7";s:7:"ItemQty";s:1:"1";}i:1;a:10:{s:6:"ItemID";s:1:"3";s:11:"ItemEventID";s:1:"1";s:7:"ItemCat";s:3:"REG";s:8:"ItemName";s:36:"Inscrição Feminina (oferta jersey)";s:8:"ItemCost";s:4:"9.00";s:12:"ItemCurrency";s:3:"EUR";s:8:"ItemFree";s:1:"N";s:9:"ItemStart";s:9:"2013-1-12";s:7:"ItemEnd";s:8:"2013-4-7";s:7:"ItemQty";s:1:"0";}i:2;a:10:{s:6:"ItemID";s:1:"4";s:11:"ItemEventID";s:1:"1";s:7:"ItemCat";s:3:"MLS";s:8:"ItemName";s:8:"Almoços";s:8:"ItemCost";s:4:"5.00";s:12:"ItemCurrency";s:3:"EUR";s:8:"ItemFree";s:1:"N";s:9:"ItemStart";s:9:"2013-1-12";s:7:"ItemEnd";s:8:"2013-4-7";s:7:"ItemQty";s:1:"0";}i:3;a:10:{s:6:"ItemID";s:2:"13";s:11:"ItemEventID";s:1:"1";s:7:"ItemCat";s:3:"MDS";s:8:"ItemName";s:16:"Jersey Masculino";s:8:"ItemCost";s:5:"10.00";s:12:"ItemCurrency";s:3:"EUR";s:8:"ItemFree";s:1:"N";s:9:"ItemStart";s:9:"2013-1-13";s:7:"ItemEnd";s:8:"2013-4-7";s:7:"ItemQty";s:1:"0";}i:4;a:10:{s:6:"ItemID";s:2:"14";s:11:"ItemEventID";s:1:"1";s:7:"ItemCat";s:3:"MDS";s:8:"ItemName";s:35:"Calção Ciclismo Alusivo ao Evento";s:8:"ItemCost";s:5:"28.00";s:12:"ItemCurrency";s:3:"EUR";s:8:"ItemFree";s:1:"N";s:9:"ItemStart";s:9:"2013-1-16";s:7:"ItemEnd";s:8:"2013-4-7";s:7:"ItemQty";s:1:"0";}i:5;a:10:{s:6:"ItemID";s:2:"11";s:11:"ItemEventID";s:1:"1";s:7:"ItemCat";s:3:"DSC";s:8:"ItemName";s:72:"Desconto de 1€ por ter licença de Competição/Betetista/Cicloturista";s:8:"ItemCost";s:5:"-1.00";s:12:"ItemCurrency";s:3:"EUR";s:8:"ItemFree";s:1:"N";s:9:"ItemStart";s:9:"2013-1-13";s:7:"ItemEnd";s:8:"2013-4-7";s:7:"ItemQty";s:1:"0";}}
我正在尝试使用这个:
$temp = unserialize(utf8_encode($dataArr[6]));
var_dump($temp);
在这个站点中,当我粘贴我的序列化数据时,一切都很好:
http://www.unserialize.com/s/4bc6dd21-e7ab-8189-ba1d-00002a57a4cb
谢谢