file_get_contents("php://input"); is not working.
$data=$_GET['json']; is working.
my url:
http://localhost/demo/plainjson.php?json={"order_number":"54321","id":"1102","status":3,"card_no":"1234"}
$data = file_get_contents("php://input");
$json = json_decode($data, true);
var_dump($json);// o/p->Null
print_r($json);// o/p-> nothing
echo $json[2];
how to echo or print the url json array or value using this need help. with explanation. thank you in advance.
json, therefor, shouldn't the json_decode be on$data['json']rather than just$data?