I am passing parameters by POST which are encoded in Json. I have captured the parameters in a PHP file. The JSON encoded parameters are as follows:
{
"id": "5",
"name": "abcd",
"imei": "1234"
}
First I have captured them as follows:
$entityBody = file_get_contents('php://input');
Then I have decoded them as follows:
$entityBody = json_decode($entityBody, true);
Now I can access id as follows:
$entityBody['id']
I want to know say, if any parameter say, 'description' is present in POST. If anyone helps me how to do that I will be really grateful. Thank you.