Thursday, 24 November 2016

How do I extract data from JSON with PHP?

$json = '
{
    "type": "website",
    "name": "hemant"
}';

$data = json_decode($json);

echo $data->type; //your data

How do I extract data from JSON with PHP?

No comments:

Post a Comment