Cita:
Iniciado por gldelossantos 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.