Tema: Xml php
Ver Mensaje Individual
  #11 (permalink)  
Antiguo 30/12/2014, 08:56
Avatar de enlinea777
enlinea777
 
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 15 años, 10 meses
Puntos: 127
Respuesta: Xml php

aqui otro ejemplo aun mas simple.

Código PHP:
<?
$xml 
simplexml_load_file("http://ws1.incasports.com/reporte/logrosdeporte.php?liga=nba");
$juegos=$xml->juego;
?>
<table border="1" cellpadding="0" cellspacing="0" >
<tr>
<td style="width: 200px">Equipo </td>
<td style="width: 200px">Referencia</td>
<td style="width: 200px">Money Line</td>
<td style="width: 200px">Run Line</td>
<td style="width: 200px">A/B</td>
</tr>
<?
foreach( $juegos as $node ){
    
$atrib_equi[]=$node->equipo1->attributes();
    
$atrib_equi[]=$node->equipo2->attributes();
    foreach(
$atrib_equi as $at){
    
?>
  <tr>
  <td style="height: 5px"><?=$at['nombre']?></td>
  <td><?=$at['referencia']?></td>
  <td><?=$at['ml']?></td>
  <td><?=$at['rl']?></td>
  <td><?=$at['ab']?></td>
  </tr>
  
        <? }
unset(
$atrib_equi);
}
?>
</table>
eso del ab no lo entendi muy bien, a que te refires?