Need assistance with JSONP Rendering to HTML. The request is present in the source code, but I keep encountering errors on the foreach line.
Any help would be greatly appreciated.
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<div class="main" >
<? php>
$jsondata = file_get_contents("http://apis.leicestershirecommunity.com/api/planning/search?output=jsonp&BBOX=");
$json = json_decode($jsondata,true);
$output = "<ul>";
foreach($json['items'] as $item) {
$output .= "<li><h2><a href=".$item['url'].">".$item['title']."</h2> </a>
</a>
<br />
</li>";
}
$output .= "</ul>";
echo $output;
?>
</div>