php - regex pattern needed to get data from html source -


i'm reading html source of online shop , can find below information shows stock availability each sku.

'{"sku-sv023435_b_m":8,"sku-sv023435_bl_m":10,"sku-sv023435_pu_m":11}' 

i need retrieve each sku , it's quantity in array.

please me php code.

thanks

edit: here source link source

i guess want this:

$a = '{"sku-sv023435_b_m":8,"sku-sv023435_bl_m":10,"sku-sv023435_pu_m":11}'; $a = json_decode($a) echo "<pre>"; print_r($a) 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -