Tema: xml y php
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/05/2007, 19:58
Avatar de kaninox
kaninox
 
Fecha de Ingreso: septiembre-2005
Ubicación: In my House
Mensajes: 3.597
Antigüedad: 18 años, 7 meses
Puntos: 49
Re: xml y php

si te das cuenta lo que se repite es
HomeTeam>
<HomeTeamID>329473</HomeTeamID>
<HomeTeamName>Tatengues</HomeTeamName>
</HomeTeam>

<AwayTeam>
<AwayTeamID>217779</AwayTeamID>
<AwayTeamName>la banda del destor</AwayTeamName>
</AwayTeam>
<MatchDate>2007-02-22 03:00:00</MatchDate>
<MatchType>4</MatchType>
<HomeGoals>2</HomeGoals>
<AwayGoals>6</AwayGoals>
</Match>

<Match Index="6">
<MatchID>107526585</MatchID>



luego son solo bucles pues con php debes generar un while a ese bucle y luego te generara el resto tan simple como eso...

o sea haces un select a tu base de datos traes los datos y los vas llenando

por ej...

$sql = mysql_query("SELECT * from tu_tabla WHERE alguna condicion...etc.
luego haces tu bucle con un while
while ($datos=mysql_fecth_array($sql))
{
aqui pones lo que puse arriba
por ej para llenar

<Match Index="<?php echo "$datos[tu_dato]";?>">
<MatchID>1<?php echo "$datos[tu_dato2]";?></MatchID>
}

etc espero me entiendas esto es como una idea nada mas :D
__________________
Gokuh Salvo al mundo. PUNTO!!!!