我正在尝试为序列化对象变量中的项目赋值。我该怎么做?我已经粘贴了SESSION数组看起来像键/值的摘录。
selected_region=18
delivery_region=18
cart=O:9:"cart":40:{s:16:"delivery_country";s:2:"US";s:16:"selected_country";s:2:"US";s:15:"delivery_region";s:2:"18";s:15:"selected_region";s:2:"18";s:24:"selected_shipping_method";s:9:"tablerate";s:24:"selected_shipping_option";s:10:"Table Rate";s:24:"selected_shipping_amount";d:8;s:6:"coupon";N;s:14:"tax_percentage";s:1:"0";s:9:"unique_id";s:40:"cdaa5a32e39b5470f21f43dd847e8cb1eb3d9327";s:6:"errors";a:0:{}s:9:"total_tax";i:0;s:13:"base_shipping";N;s:19:"total_item_shipping";N;s:14:"total_shipping";N;s:8:"subtotal";i:0;s:11:"total_price";N;s:13:"uses_shipping";N;s:13:"is_incomplete";b:1;s:10:"cart_items";a:0:{}s:9:"cart_item";O:14:"cart_item":34:
我正在尝试将“selected_shipping_amount”分配给另一个值。我怎样才能达到并指定它?
...谢谢
答案 0 :(得分:1)
我认为您唯一的选择是反序列化它,分配值然后再次序列化。