0

JSON

    {  
   "entry":[  
      {  
         "changes":[  
            {  
               "field":"leadgen",
               "value":{  
                  "created_time":1499940591,
                  "page_id":"160135091155811",
                  "form_id":"151012182128929",
                  "leadgen_id":"153650938531720"
               }
            }
         ],
         "id":"160135091155811",
         "time":1499940592
      }
   ],
   "object":"page"
}

PHP Code:

$json= file_get_contents('php://input');
$input = json_decode($json);
echo $input['entry']['changes']['leadgen_id'];

How do I extract the leadgen_id? I tried many combinations, all give an error.

The only output I get is ">". I have checked all the open tags and balanced everything, still getting error.

0 Answers0