Reputation: 39
I've never worked with json
before and I'm unsure how to fully. So essentially I need to get all the items in the rgDescriptions
table, but I am honestly unsure how to.
So if someone could point me in the right direction that would be great. I've tried to look for documentation/tutorials on Json but can't seem to find advanced stuff.
Only stuff like {"id":"2","instanceID":"8"}
Example of the json I want to decode
Upvotes: 0
Views: 427
Reputation: 11987
use json_desode()
to decode the json format.
$json = '{"id":"2","instanceID":"8"}';
$decoded = json_decode($json);
print_r($decoded);// will print decoded format of your json
echo $decoded->id; // outputs => 2
echo $decoded->instanceID; // outputs => 8
Otuput:
stdClass Object
(
[id] => 2
[instanceID] => 8
)
Upvotes: 2