Ι need a function to unserialize data of a specific field to export to XML File.
My serialize field is
<B2B_Sale_price><![CDATA[a:1:{i:6704;a:2:{s:13:"regular_price";s:8:"17.33871";s:10:"sale_price";s:5:"13.77";}}]]></B2B_Sale_price>
and i'd like to export only the sale_price.
This function works perfect for csv export
function data_deserialize_csv($value){$output = '';$data = unserialize($value);print_r($data);$data = reset($data);return $data['sale_price'];}
But for xml return an error PHP Error: reset() expects parameter 1 to be array, bool given on line 15 of the Functions Editor