Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/08/2012, 10:19
sct012
 
Fecha de Ingreso: junio-2012
Mensajes: 4
Antigüedad: 11 años, 11 meses
Puntos: 0
Pregunta Respuesta: PHP Cake - RSS

Cita:
Iniciado por gldelossantos Ver Mensaje
pon tu codigo mas completo para poder visualizar bien
- Del RSS:
http://boe.es/rss/canal_leg.php?l=l&c=127

- Me da el siguiente error:
Invalid argument supplied for foreach()

- He puesto como código PHP, el siguiente:
<?php
foreach($canal_cd as $item){
echo '<li>'.$html->link($item->get_date('d.m.Y').' '.$item->get_title(), $item->get_permalink(), array('target'=>'_blank')).'</li>';
}
?>

Completo...


function index() {
$this->set('title_for_layout', __('Home', true));

$canal_cd = $this->Simplepie->feed('http://boe.es/rss/canal_leg.php?l=l&c=127',10);

$this->set(compact('canal_cd'));
}



Un saludo.