PHP stdClass对象

时间:2016-01-12 10:07:55

标签: php

我有一个stdClass对象,其格式如图所示。 enter image description here

我想访问NumberOfUnits。我试过了                                      $finalbooking->HotelReservations->HotelReservation->RoomStays->RoomStay->RoomTypes{0}->{'@attributes'}->NumberOfUnits;

$finalbooking->HotelReservations->HotelReservation->RoomStays->RoomStay->RoomTypes->{'@attributes'}->NumberOfUnits;

但没有运气。任何帮助,将不胜感激。谢谢

0 个答案:

没有答案