I cannot access the contents within the orders array. I am currently doing this to no avail, and am wondering what I am doing wrong:
the $json object is a json response from a rest api.
$orderData = $json['orders'];
  foreach($orderData['orders'] as $order){
}
{  
   "errors":[  
   ],
   "orders":[  
      {  
         "note":"",
         "estimated_shipping_fee":"0.00",
         "payment_method":"PAY_CYBERSOURCE",
         "escrow_amount":"12.95",
         "message_to_seller":"",
         "shipping_carrier":"Singpost - Normal Mail",
         "currency":"SGD",
         "create_time":1532064559,
         "pay_time":1532064618,
         "recipient_address":{  
            "town":"",
            "city":"",
            "name":"Teo",
            "district":"",
            "country":"SG",
            "zipcode":"41253",
            "full_address":"In some street somewhjere",
            "phone":"23154991",
            "state":""
         },
         "days_to_ship":3,
         "tracking_no":"",
         "order_status":"SHIPPED",
         "note_update_time":0,
         "update_time":1532082525,
         "goods_to_declare":false,
         "total_amount":"12.95",
         "service_code":"",
         "country":"SG",
         "actual_shipping_cost":"",
         "cod":false,
         "items":[  
            {  
               "weight":1.0,
               "item_name":"ABC",
               "is_wholesale":false,
               "item_sku":"5123433123",
               "variation_discounted_price":"12.95",
               "variation_id":0,
               "variation_name":"",
               "item_id":1126534500,
               "variation_quantity_purchased":1,
               "variation_sku":"",
               "variation_original_price":"12.95"
            }
         ],
         "ordersn":"3589290984539"
      }
   ]
}Trying to access the variables directly, by say json['orders'][0]['payment_method'] is not working.
 
     
    