Parsing values from JSON using php

后端 未结 4 1484
再見小時候
再見小時候 2020-12-22 06:16

I\'m new to PHP and JSON, so hoping someone can help me.

I have a PHP which a 3rd party performs a POST against, delivering JSON data. An example of the data sent wo

4条回答
  •  悲哀的现实
    2020-12-22 06:27

    You can quickly acheive this in following manner:

    $body = @file_get_contents('php://input');
    $event_json = json_decode($body, true);
    print $event_json['data']['object']['fee'];
    

提交回复
热议问题