Tema: Php xml
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/10/2009, 05:29
samu22
 
Fecha de Ingreso: abril-2008
Mensajes: 453
Antigüedad: 16 años, 1 mes
Puntos: 16
Respuesta: Php xml

es que estas volviendo hacer un fetch_assoc dentre de un fetch array

Código php:
Ver original
  1. <?php
  2. $xml = "<?xml version=\"1.0\"?>\n";
  3. while($row=mysql_fetch_assoc($query)){
  4.          //recorrido de las filas
  5.          $xml .= "\t<entry>\n";
  6.          $xml .= "\t\t<id>" . $row['id'] . "</id>\n";
  7.          $xml .= "\t\t<mail>" . $row['mail'] . "</mail>\n";
  8.          $xml .= "\t\t<nombre>" . $row['nombre'] . "</nombre>\n";
  9.          $xml .= "\t\t<apellido1>" . $row['apellido1'] . "</apellido1>\n";
  10.          $xml .= "\t\t<apellido2>" . $row['apellido2'] . "</apellido2>\n";
  11.          $xml .= "\t\t<empresa>" . $row['empresa'] . "</empresa>\n";
  12.          $xml .= "\t\t<direccion>" . $row['direccion'] . "</direccion>\n";
  13.          $xml .= "\t\t<telefono>" . $row['telefono'] . "</telefono>\n";
  14.          $xml .= "\t</entry>\n";
  15. }