Hola
tengo un problema al obtener datos de un json
este es mi codigo:
<?php
$url = 'http://www.clicmart.com/iphone/ofertas-usr.php?usr=1';
$json = file_get_contents($url);
$data = json_decode($json, true);
print_r($data->{'nombreprod'}->{"precio"});
?>
pero me arroja este error:
Notice: Trying to get property of non-object in /opt/lampp/htdocs/caja/index.php on line 145
Si alguien me pueda ayudar, gracias
saludos