I am trying to get the token held in this variable $data
- which I obtained via
$data = json_decode($result, true);
json:
{
"response": {
"status": "OK",
"token": "goog:11229:116ewfd1c0f5c:goog",
"dbg_info": {
"instance": "53.google.com",
"slave_hit": false,
"db": "master",
"parent_dbg_info": {
"instance": "23.google.com",
"slave_hit": false,
"db": "master",
"parent_dbg_info": {
"instance": "44.google.com",
"slave_hit": false,
"db": "master",
"time": 212.100215784,
"version": "1.19",
"warnings": [],
"slave_lag": 0,
"start_microtime": 123620305.0342
}
I already decoded the JSON and it's held in $data
I tried to get
echo $data[response]->[token];
and
echo $data[response][token];