Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/07/2016, 19:20
juansemaster
 
Fecha de Ingreso: noviembre-2005
Mensajes: 144
Antigüedad: 18 años, 6 meses
Puntos: 2
Respuesta: Leer valores en json en php

Al final llegue así.... supongo que hay de alguna manera mejor.

Código PHP:
Ver original
  1. $str_datos = file_get_contents("$urly");
  2. $datos = json_decode($str_datos,true);
  3.  
  4. foreach ($datos['items'] as $product) {
  5. }
  6.  
  7. echo "<br/>";
  8. echo "Duracion: ".$product['contentDetails']['duration']." <br/>";