Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/20/2022 in all areas

  1. Just as before echo $arr['OrderAddresses'][0]['ConsignmentNo']; //--> 547645363546 "- >" is for object properties not array keys
    1 point
  2. <?php $jsn = '[{"OrgID":"1234567890987654321","OrderNumber":"M123456","OrigOrderNumber":"","Placed":"2022-08-17T14:04:47.653","PostCode":"AB1 2CD","BackOfficeOrderNumber":"12345678","CustomerName":"My Name","OutletName":"My Name Two","OrderStatus":"Delivered","OrderRef":"O-0012345678","AddressCount":1}]'; //convert to an array $arr = json_decode($jsn, 1); // output the array to view structure echo '<pre>' . print_r($arr, 1) . '</pre>'; ?> The resulting array is and you then access you required value by following the array keys (indicated), so you want $order_number = $arr[0]['OrderNumber'];
    1 point
  3. You find that out with a process commonly known as "testing" (You might want to Google that)
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.