1
我已序列數據在WordPress的自定義字段中輸入以下字符串序列化的數據工作:在WordPress的
$first_string = 'a:9:{s:5:"email";s:13:"[email protected]";s:4:"name";s:15:"Werner
Etsebeth";s:8:"address1";s:17:"1 Giligans
Island";s:8:"address2";s:1:"5";s:4:"city";s:9:"Cape
Town";s:5:"state";s:2:"AL";s:3:"zip";s:4:"7460";s:7:"
country";s:2:"US";s:5:"phone";s:0:"";}
$second_string = 'a:1:{i:4;a:1:{i:0;a:6:
{s:3:"SKU";s:0:"";s:4:"name";s:12:"Hypnotherapy";s:3:"url";s:72:"http://localhost
/mindworksa.co.za/wordpress/store/products/hypnotherapy
/";s:5:"price";s:5:"50.00";s:8:"quantity";s:1:"1";s:8:"download";s:0:"";}}}'
如何分配信息變量,所以我可以單獨訪問,例如$ SKU =「」, $ name =等
我從來沒有使用過序列化的數據,任何幫助將不勝感激。
非常感謝