How to decode the response and get the data from response.

$response = curl_exec($curl);

$jsonArray = json_decode($response, true);

if($jsonArray[‘status’] == 200) { $responseArray=$jsonArray[‘response’]; $freight_option=$responseArray[‘freight_option’]; $freight_minimum_amount=$responseArray[‘freight_minimum_amount’];

}

Leave a comment

Your email address will not be published. Required fields are marked *