Now I have this JSON URL https://vidsrc.me/movies/latest/page-1.json I want to echo IMDB ID, Title, Quality and Embed URL for each array as this sounds like a multidimensional array. But every time I try to do this. I get one of the following errors: - Undefined Index - Undefined offset So I want to loop through it and echo each of those items and break line between each, This is the code
<?php
$url = file_get_contents('https://vidsrc.me/movies/latest/page-1.json');
$decode = json_decode($url, TRUE);
$res = $decode->result;
foreach($decode as $value){
$imdb = $res->imdb_id;
$title = $res->title;
$quality = $res->quality;
$url = $res->embed_url;
echo $imdb;
echo "<br>";
echo $tite;
echo "<br>";
echo $quality;
echo "<br>";
echo $url;
}
?>