This code is supposed to return the value of /architecture/building_occupant/buildings_occupied from the Json Freebase file, but it doesn't do anything.
<?php
$url = "https://www.googleapis.com/freebase/v1/topic/en/barack_obama?filter=all";
$json = file_get_contents($url);
$json = str_replace('/', 'www', $json);
$json = str_replace('_', 'www', $json);
$data = json_decode($json, TRUE);
echo $data->property->wwwarchitecturewwwbuildingwwwoccupantwwwbuildingswwwoccupied->values->text;
?>
I don't seem to get an error message, either...
please assist, and thank you!