解析来自webhooks的数据

I am parsing data from webhook using this: $data = json_decode(file_get_contents('php://input'), true); So I have array of data in json file. How can I can get all of fields be as variables in json (Like { time: 'now' } be variable $time='now';

PHP has an extract function that will convert array keys into variables. Whether that is a good idea is a totally different question.

$data = json_decode(file_get_contents('php://input'), true)

return arrray expample array('time':'10:00');


you can get variable example

echo $data['time'];

oupt put => 10:00