PHP assumes that unquoted literals are constants, and constant names cannot begin with numbers. This causes 0_attr parsed for the number 0, followed by the constant _attr - which makes no sense.
ALWAYS specify array indices.
echo $xmlArray['OTA_HotelAvailRS']['Properties']['Property']['0_attr']['HotelCityCode'];
source share