get value from [] json php code example
Example 1: php return json
header('Content-type: application/json');
echo json_encode($array);
Example 2: how to get data from json array in php
$data = json_decode($json);
header('Content-type: application/json');
echo json_encode($array);
$data = json_decode($json);