title: PHP PayPal JSON Decode
body: <p>I am trying to decode this JSON Code to display the Sale Id (5VR4XXXXX4437941) </p>
  
  <pre><code>{ "id": "PAY-HIDDEN", "create_time": "2015-05-04T06:30:46Z", "update_time": "2015-05-04T06:32:16Z", "state": "approved", "intent": "sale", "payer": { "payment_method": "paypal", "status": "VERIFIED", "payer_info": { "email": "haroonbg@googlemail.com", "first_name": "XXXXXXX", "last_name": "XXXXXX", "payer_id": "XXXXXXXXXXXX", "shipping_address": { "line1": "XXXX", "city": "XXX", "state": "XXX", "postal_code": "XXXTF", "country_code": "GB", "recipient_name": "TXXXXXg" } } }, "transactions": [ { "amount": { "total": "3.00", "currency": "GBP", "details": { "subtotal": "3.00" } }, "description": "uPlayEve 10,000 Coins and 20,000 uPoints", "related_resources": [ { "sale": { "id": "5VR4XXXXX4437941", "create_time": "2015-05-04T06:30:46Z", "update_time": "2015-05-04T06:32:16Z", "amount": { "total": "3.00", "currency": "GBP" }, "payment_mode": "INSTANT_TRANSFER", "state": "denied", "protection_eligibility": "INELIGIBLE", "parent_payment": "PAY-XXXXXXX", "links": [ { "href": "https://api.paypal.com/v1/payments/sale/XXXXX", "rel": "self", "method": "GET" }, { "href": "https://api.paypal.com/v1/payments/sale/XXXXXXXX/refund", "rel": "refund", "method": "POST" }, { "href": "https://api.paypal.com/v1/payments/payment/PAY-XXXX", "rel": "parent_payment", "method": "GET" } ] } } ] } ], "links": [ { "href": "https://api.paypal.com/v1/payments/payment/PAY-XXXX", "rel": "self", "method": "GET" } ] }
  </code></pre>
  
  <p>Please help I am trying to place the Transaction->sale->id value in a string $saleid</p>
  
  <p>Much appreciated</p>
  
  <p>Haroon </p>