用php拉数据和循环

I have a php file that is trying to get information from a XML API using SOAP.

The code for pulling data is

 <?php
  // create SOAP client object
  $client = new SoapClient("http://www.bookingassist.ro/test/book.wsdl", array('trace' => 1));

  try {
      $rooms = array(); 
      // First Room
      $rooms[] = array(array("paxType" => "Adult"));
      $filters[] = array("filterType" => "resultLimit", "filterValue" => "6");     
      // (start search)
      $checkAvailability = $client->getAvailableHotel("APIKEY", "RHMK", "2015-04-20", "2015-04-27", "EUR", "RO", "false", $rooms, $filters);
  }
  catch (SoapFault $exception) {
      echo $exception->getMessage();
      exit;
  }

?>
 <?php
  if (is_object($checkAvailability->availableHotels)) 
  $hotelResponse[] = $checkAvailability->availableHotels;
  $hotelResponse = $checkAvailability->availableHotels;
  foreach ((array)$hotelResponse as $hnum => $hotel)
?>  

below in page i have the folowing code

<article class="box">
<h4><?php echo  $hotel->hotelCode?></h4>                                      
<span class="price">aprox/NOAPTE</small>€ <?php echo $hotel->totalPrice ?></span>
</article>

My query is can i loop the entire content from as many responses i have in the filters array ($filters[] = array("filterType" => "resultLimit", "filterValue" => "6"); )

I have tried the same but in a blank page withour any css onky a table with header abd uts extracting and looping the information as requested. - http://www.bookingassist.ro/test/test.php

If you are only getting one result I don't think the values you have in "$hotelResponse" are what you think.

There's a good chance that your code is entering the second part of your if/else statement explaining why you are only getting one result.

Do a var_dump on this to verify you have X amount of hotels