0

Any help will be appreciated

<?php 
    $jsonobj = '{
      "status": "1",
      "receiver_account": "8",
      "USD_amount": "1.670",
      "fee_in_USD": "0.000",
      "PKR_amount": "280",
      "fee_in_PKR": "0",
      "USD_amount_with_fee": "1.670",
      "PKR_amount_with_fee": "280",
      "trx_website": "website.com",
      "transaction_id": "2JW9651118P",
      "trx_date": "25-03-2020 9:13:48 PM",
      "order_id": "12345678",
      "addi_info": "Test Payment",
      "sender_details": "Fund Received From 161919",
      "trx_details": "$1.67 Receive against TID: '2JW9651118P' "
    }';
    json_decode($jsonobj);
    var_dump($jsonobj);
?>
Mech
  • 3,952
  • 2
  • 14
  • 25

1 Answers1

1

You need to escape the single quotes in your last field:

"trx_details": "$1.67 Receive against TID: \'2JW9651118P\' "
Sebastian Kaczmarek
  • 8,120
  • 4
  • 20
  • 38