• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

php help needed

Ikigai

Active member
Jan 28, 2021
296
87
28
33
India
what is the PHP code to get values from this

[{"id":17,"inv_no":"117","order_id":"15","qty":5,"variant_id":5,"vender_id":8,"price":10000,"discount":1000,"tax_amount":"9000","shipping":"0","handlingcharge":5,"status":"delivered","local_pick":null,"loc_deliv_date":null,"created_at":"2021-05-30T13:16:31.000000Z","updated_at":"2021-05-31T10:52:26.000000Z","paid_to_seller":"NO","igst":1098,"sgst":null,"cgst":null,"deleted_at":null,"tracking_id":"8YIFNSCHZ4","gift_charge":0}]


I want to get inv_no, created_at , tracking_id

somebody help
 
array (
'id' => 17,
'inv_no' => '117',
'order_id' => '15',
'qty' => 5,
'variant_id' => 5,
'vender_id' => 8,
'price' => 10000,
'discount' => 1000,
'tax_amount' => '9000',
'shipping' => '0',
'handlingcharge' => 5,
'status' => 'delivered',
'local_pick' => NULL,
'loc_deliv_date' => NULL,
'created_at' => '2021-05-30T13:16:31.000000Z',
'updated_at' => '2021-05-31T10:52:26.000000Z',
'paid_to_seller' => 'NO',
'igst' => 1098,
'sgst' => NULL,
'cgst' => NULL,
'deleted_at' => NULL,
'tracking_id' => '8YIFNSCHZ4',
'gift_charge' => 0,
);
 
  • Like
Reactions: freenulled
bro this is the complete file ....... it is actually from emart application's order page
 
when i echo $x ... i got this
[{"id":17,"inv_no":"117","order_id":"15","qty":5,"variant_id":5,"vender_id":8,"price":10000,"discount":1000,"tax_amount":"9000","shipping":"0","handlingcharge":5,"status":"delivered","local_pick":null,"loc_deliv_date":null,"created_at":"2021-05-30T13:16:31.000000Z","updated_at":"2021-05-31T10:52:26.000000Z","paid_to_seller":"NO","igst":1098,"sgst":null,"cgst":null,"deleted_at":null,"tracking_id":"8YIFNSCHZ4","gift_charge":0}]
 
i try but i cant upload any file ... and not even a script .. why this happens.. im getting this error

threads/php-help-needed.47930/add-reply:1 Failed to load resource: the server responded with a status of 403 ()
 
what is the PHP code to get values from this
PHP:
$json_data = '[{"id":17,"inv_no":"117","order_id":"15","qty":5,"variant_id":5,"vender_id":8,"price":10000,"discount":1000,"tax_amount":"9000","shipping":"0","handlingcharge":5,"status":"delivered","local_pick":null,"loc_deliv_date":null,"created_at":"2021-05-30T13:16:31.000000Z","updated_at":"2021-05-31T10:52:26.000000Z","paid_to_seller":"NO","igst":1098,"sgst":null,"cgst":null,"deleted_at":null,"tracking_id":"8YIFNSCHZ4","gift_charge":0}]';
$obj = json_decode($json_data)[0];

echo "inv_no: ".$obj->inv_no."<br/>";
echo "created_at: ".$obj->created_at."<br/>";
echo "tracking_id: ".$obj->tracking_id."<br/>";
 
  • Like
Reactions: frizzel and Ikigai
PHP:
$json_data = '[{"id":17,"inv_no":"117","order_id":"15","qty":5,"variant_id":5,"vender_id":8,"price":10000,"discount":1000,"tax_amount":"9000","shipping":"0","handlingcharge":5,"status":"delivered","local_pick":null,"loc_deliv_date":null,"created_at":"2021-05-30T13:16:31.000000Z","updated_at":"2021-05-31T10:52:26.000000Z","paid_to_seller":"NO","igst":1098,"sgst":null,"cgst":null,"deleted_at":null,"tracking_id":"8YIFNSCHZ4","gift_charge":0}]';
$obj = json_decode($json_data)[0];

echo "inv_no: ".$obj->inv_no."<br/>";
echo "created_at: ".$obj->created_at."<br/>";
echo "tracking_id: ".$obj->tracking_id."<br/>";
thanks bro :)
 
For index.blade.php:
PHP:
echo "inv_no: ".$value->inv_no."<br/>";
echo "created_at: ".$value->created_at."<br/>";
echo "tracking_id: ".$value->tracking_id."<br/>";

Corrected.
 
Last edited:
i uploaded two images...
table.jpeg- this is the seller's order page .... it only have few columns but, i want to show inv no, cgst, sgst, igst, shipping, handing charger, gift charger etc..
 
but when a customer purchase morethan one item... it only show cgst sgst of first item only.... i this that foreach only once .... how to get all data?
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock