I'm reading html source of an online shop and I can find below information which shows stock availability for each SKU.
'{"sku-SV023435_B_M":8,"sku-SV023435_BL_M":10,"sku-SV023435_PU_M":11}'
I need to retrieve each SKU and it's quantity in an array.
Please help me which the PHP code.
Thanks
Edit: Here is the source link Source
I guess you 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)