dear all,
i want to parse this url:
http://core3.oomph.co.id/api_omph_playground/index.php/nav/get_menu/1002/
to get all image, selectedImage, and url value.
and my php syntax is:
<?php
$url1 = "http://core3.oomph.co.id/api_omph_playground/index.php/nav/get_menu/1002/";
$url = file_get_contents("$url1");
$arr = json_decode($url,true);
foreach($arr['menu']['image'] as $item) {
echo "image: ". $item[0] ."<br>";
echo "image_selected: ". $item[1] ."<br>";
echo "url: ". $item[2] ."<br>";
}
?>
but i got Warning: Invalid argument supplied for foreach(), so how to get expected results?