Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created July 31, 2013 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EdwardIII/d17065d51ab75b8baf71 to your computer and use it in GitHub Desktop.
Save EdwardIII/d17065d51ab75b8baf71 to your computer and use it in GitHub Desktop.
<?php
foreach($availability_rates as $rate){
foreach($rate['RoomTypes'] as $roomtype){
if(count($roomtype['Rates']['RateDate']) > 1){
foreach($roomtype['Rates']['RateDate'] as $ratedate){
$ratedate['IsRealArrival'] = false;
$ratedate['IsRealDeparture'] = false;
if($this->_compare_dates($ratedate['Date'], $arrival_date)){
$ratedate['IsRealArrival'] = true;
}
if($this->_compare_dates($ratedate['Date'], $departure_date)){
$ratedate['IsRealDeparture'] = true;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment