Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/07/2011, 11:27
tai007
 
Fecha de Ingreso: abril-2010
Mensajes: 76
Antigüedad: 16 años, 6 meses
Puntos: 0
Respuesta: Parsear con PHP Simple HTML DOM

Lo he adaptado a mi código...

Código PHP:
<?php  
include('simple_html_dom.php'); 
$html = file_get_html('38024.xml'); 
?>  
<table border="1"><tr><td>Dias</td> 
<?php  
       
foreach($html->find('dia') as $element2)     
       echo 
'<td>' . $element2-> fecha . '</td>'; 
?>  
</tr><tr> 
<td> 
Prob 
</td> 
<?php 
 
foreach($html->find('prob') as $element4)     
 
$conteo=$element4->length ;     
  for (
$i=3; $i<$conteo;  $i++)
 
{
 echo 
'<td>' . $element4->outertext  . '%' . '</td>';
} 

?>  
</tr></table> 
<?php 
        

?>
Pero sigue sin funcionarme