Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/08/2015, 05:55
man0l0
 
Fecha de Ingreso: febrero-2006
Mensajes: 155
Antigüedad: 18 años, 2 meses
Puntos: 6
Respuesta: Extraer xml @attributes con php

Hola, según lo que veo y sin mirar el XML

$marca= (string)$fila->properties->property[1]->attributes();

En marca obtienes "manufacturer", pero el resultado de ese método retorna un array, pero tu le estás haciendo un casting a string.

Por lo tanto, podrías intentar hacer lo siguiente:

$marca= $fila->properties->property[1]->attributes();
Y luego deberías tener:
echo $marca['name']; //manufacturer
echo $marca['value']; //Nike


Slds!