Parsing values from JSON using php

后端 未结 4 1481
再見小時候
再見小時候 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条回答
  •  Happy的楠姐
    2020-12-22 06:18

    you have multi levels of objects so use:

    echo($event_json->data->object->fee);
    

    Basically you are echoing fee, which is a member of the object name object, which in turn is the attribute of an object named data, which again in turn is a member of your $event_json object.

提交回复
热议问题