title: How to convert this XML request into array in php?
body: <p>I am new to SOAP. I am unable to convert this request into an array. This xml array should be in string type.</p>
  
  <p><strong>Xml request:</strong></p>
  
  <pre><code>&lt;OTA_HotelAvailRQ Version="1.0"&gt;
     &lt;POS&gt;
      &lt;Source&gt;
       &lt;UniqueId Id="20000704abcde:105ABCDE" /&gt;
      &lt;/Source&gt;
     &lt;/POS&gt;
     &lt;AvailRequestSegments&gt;
      &lt;AvailRequestSegment&gt;
       &lt;StayDateRange End="2011-08-15" Start="2011-08-14" /&gt;
       &lt;RoomStayCandidates&gt;
        &lt;RoomStayCandidate Quantity="1"&gt;
         &lt;GuestCounts&gt;
          &lt;GuestCount AgeQualifyingCode="10" Count="1" /&gt;
         &lt;/GuestCounts&gt;
        &lt;/RoomStayCandidate&gt;
       &lt;/RoomStayCandidates&gt;
       &lt;HotelSearchCriteria&gt;
        &lt;Criterion&gt;
         &lt;HotelRef Destination="East London, South Africa" CityCode="" CountryCode="" HotelName="" MinHotelRating="1"/&gt;
         &lt;SearchCurrency&gt;EUR&lt;/SearchCurrency&gt;
         &lt;AdditionalInfo Value="1" /&gt;
         &lt;Language&gt;EN&lt;/Language&gt;
        &lt;/Criterion&gt;
       &lt;/HotelSearchCriteria&gt;
      &lt;/AvailRequestSegment&gt;
     &lt;/AvailRequestSegments&gt;
    &lt;/OTA_HotelAvailRQ&gt; 
  </code></pre>
  
  <p><strong>xml response</strong>:</p>
  
  <pre><code>&lt;OTA_HotelAvailRS Version="1.0"&gt;  
       &lt;Success Id="24064"/&gt;  
       &lt;Properties&gt;  
            &lt;Property HotelCityCode="4162" HotelCode="6001287" HotelName="Amaryllis"&gt;  
                 &lt;RelativePosition Direction="" Distance="0" DistanceUnitName=""/&gt;  
                 &lt;RoomStays&gt;  
                      &lt;RoomStay&gt;  
                           &lt;RatePlans&gt;  
                                &lt;RatePlan RatePlanCode="12201993"/&gt;  
                           &lt;/RatePlans&gt;  
                           &lt;RoomRates&gt;  
                                &lt;RoomRate&gt;  
                                     &lt;Rates&gt;  
                                          &lt;Rate EffectiveDate="2010-06-12" ExpireDate="2010-06-13"&gt;  
                                               &lt;Base Amount="76.00" CurrencyCode="EUR"/&gt;  
                                               &lt;RateDescription Adults="1" Availability="A" Children="0" RoomNum="1"&gt;  
                                                    &lt;![CDATA[Single room]]&gt;  
                                               &lt;/RateDescription&gt;  
                                          &lt;/Rate&gt;  
                                     &lt;/Rates&gt;  
                                &lt;/RoomRate&gt;  
                           &lt;/RoomRates&gt;  
                           &lt;Meals Description="Buffet B'Fast (continental)"/&gt;  
                           &lt;EssentialInfo&gt;Here comes essential information&lt;/EssentialInfo&gt; 
                      &lt;/RoomStay&gt;                                        
                 &lt;/RoomStays&gt;  
                 &lt;Promotions/&gt;  
                 &lt;AdditionalInfo&gt;  
                      &lt;HotelStarDetail rating="2"/&gt;  
                      &lt;HotelImages&gt;  
                           &lt;HotelImage Type="Bedroom" URL="https://www.miki.co.uk/live/hotel/mikiNet/image/v1.0/FR/4162/419/lr/room.jpg"/&gt;  
                           &lt;HotelImage Type="Bedroom"                                  URL="https://www.miki.co.uk/live/hotel/mikiNet/image/v1.0/FR/4162/419/lr/room1.jpg"/&gt;  
                      &lt;/HotelImages&gt;  
                      &lt;HotelDescription&gt;  
                           &lt;LongDescription&gt;This 2 star hotel is located in the city centre of Nice. It is close 
                           to the Beach. The Hotel has a restaurant.&lt;/LongDescription&gt;  
                      &lt;/HotelDescription&gt;  
                 &lt;/AdditionalInfo&gt;  
            &lt;/Property&gt; 
       &lt;/Properties&gt;  
  &lt;/OTA_HotelAvailRS&gt;
  </code></pre>