Issue
I'm wondering if anybody can help me put the below curl response into PHP variables.
If possible, i'd like to extract each of the goods_id and goods_descriptions.
Thanks in advance.
Solution
What you need is json_decode()
$data = json_decode ($result);
echo $data->result->goods[0]->goods_id;
Or, if you prefer associative arrays:
$data = json_decode ($result, true);
echo $data['result']['goods'][0]['goods_id'];
PHP.net documentation on json_decode
Answered By - Oleg Dubas