$json_url ="https://graph.facebook.com/Lil..."; $json = file_get_contents($json_url); $json_output = json_decode($json); $likes = 0; if($json_output->likes){ $likes = $json_output->likes; } echo '?='.$likes;