[ create a new paste ] login | about

Link: http://codepad.org/JKYUS6yd    [ raw code | output | fork ]

PHP, pasted on Dec 5:
1
2
3
4
5
6
<?php

    $data = 'a:2:{i:0;a:17:{s:8:"quantity";i:1;s:10:"product_id";i:5196;s:11:"category_id";s:3:"209";s:5:"price";d:1;s:3:"tax";s:5:"18.00";s:6:"tax_id";s:1:"1";s:11:"description";s:0:"";s:12:"product_name";s:4:"test";s:11:"thumb_image";s:0:"";s:3:"ean";s:0:"";s:10:"attributes";s:6:"a:0:{}";s:16:"attributes_value";a:0:{}s:6:"weight";s:6:"0.0000";s:9:"vendor_id";s:1:"0";s:5:"files";s:6:"a:0:{}";s:14:"freeattributes";s:6:"a:0:{}";s:25:"dependent_attr_serrialize";s:6:"a:0:{}";}i:1;a:17:{s:8:"quantity";i:1;s:10:"product_id";i:4617;s:11:"category_id";s:3:"211";s:5:"price";d:1200;s:3:"tax";s:5:"18.00";s:6:"tax_id";s:1:"1";s:11:"description";s:74:"Машка блуза,EXTERRA ГТЦ 1 спрат и CITY MALL 1спрат";s:12:"product_name";s:0:"";s:11:"thumb_image";s:42:"thumb_e069100cef8553637664fc695df55c66.JPG";s:3:"ean";s:0:"";s:10:"attributes";s:6:"a:0:{}";s:16:"attributes_value";a:0:{}s:6:"weight";s:6:"0.0000";s:9:"vendor_id";s:1:"0";s:5:"files";s:6:"a:0:{}";s:14:"freeattributes";s:6:"a:0:{}";s:25:"dependent_attr_serrialize";s:6:"a:0:{}";}}';
    $rslt = unserialize($data);

    echo $rslt[0]["product_id"];


Output:
1
5196


Create a new paste based on this one


Comments: