{
meta: {}
notifications: []
response: {}
}
$asObjects = json_decode($json);
foreach ($asObjects as $obj)
{
echo $obj->response->text;
echo "<br>";
}
This method do not work because text in response : {}
how can i get text ?
{
meta: {}
notifications: []
response: {}
}
$asObjects = json_decode($json);
foreach ($asObjects as $obj)
{
echo $obj->response->text;
echo "<br>";
}
This method do not work because text in response : {}
how can i get text ?
After seeing your full json, you need to iterate on the items array and then show the text for each item :
$jsonObj = json_decode($json);
foreach ($jsonObj->response->tips->items as $obj)
{
echo $obj->text;
echo "<br>";
}