Foros del Web » Programando para Internet » PHP »

xml node attribute en array

Estas en el tema de xml node attribute en array en el foro de PHP en Foros del Web. hola amigos programadores una vez mas vengo a complicarles con uand e mis rpeguntas tengo un xml en el cual en uno de los nods ...
  #1 (permalink)  
Antiguo 29/11/2010, 11:52
Avatar de milerweb  
Fecha de Ingreso: enero-2008
Ubicación: Lima peru
Mensajes: 81
Antigüedad: 16 años, 2 meses
Puntos: 1
Pregunta xml node attribute en array

hola amigos programadores una vez mas vengo a complicarles con uand e mis rpeguntas

tengo un xml en el cual en uno de los nods tiene un atributo

<HotelRoom SHRUI="O4i+abUaQM+ohkvxTXOihQ==" onRequest="N">

quiero jalar el atributo SHRUI

mi cogio es el siguiente
Código PHP:
foreach($_hotel['AvailableRoom'] as $value)
                        {
                        
$temp['HotelOccupancy']=$value['HotelOccupancy'];
                        
$temp['HotelRoom']=$value['HotelRoom'];
                        
$temp['SHRUI']=$value['HotelRoom']['SHRUI'];
         
        
                                foreach(
$temp['HotelOccupancy'] as $value)
                                {
                                
                                
$temp['RoomCount']=$value['Name'];
                                
$temp['Occupancy']=$value['Occupancy'];
                                        foreach(
$temp['Occupancy'] as $value)
                                        {
                                        
$temp['AdultCount']=$value['AdultCount'];
                                        
$temp['ChildCount']=$value['ChildCount'];
                                        }
                            
                                }
                                foreach(
$temp['HotelRoom'] as $value)
                                {
                                
                                
$temp['Board']=$value['Board'];
                                
$temp['RoomType']=$value['RoomType'];
                                
$temp['Price']=$value['Price'];
                                
                                        foreach(
$temp['Price'] as $value)
                                        {
                                        
$temp['Amount']=$value['Amount'];
                                        }
                            
                                }
        
$_hotelesroom[]=$temp;
                            
                        } 
pero no me jala el valor del atributo todo lo demas jala menos el valor del atributo

y al mostrar uso esto y no funka me sale en blanco

Código PHP:
foreach($hotel['AvailableRoom'] as $hot)
                {
                    
            echo = 
$hot['SHRUI'];


Etiquetas: xml
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:48.