Быдло код это или нет?
if (in_array($countryname, $countryarray)) {
$praleisti=true;
$i=$i-1;
}
$countryarray[] = $countryname;
$regionnames = $data->getElementsByTagName( "REGIONNAME" );
$regionname = $regionnames->item(0)->nodeValue;
$citynames = $data->getElementsByTagName( "CITYNAME" );
$cityname = $citynames->item(0)->nodeValue;
$PRICE_FOR_PERSONs = $data->getElementsByTagName( "PRICE_FOR_PERSON" );
$PRICE_FOR_PERSON = $PRICE_FOR_PERSONs->item(0)->nodeValue;
$dates = $data->getElementsByTagName( "date" );
$date = $dates->item(0)->nodeValue;
$durations = $data->getElementsByTagName( "duration" );
$duration = $durations->item(0)->nodeValue;
$DEPARTUREAIRPORTs = $data->getElementsByTagName( "DEPARTUREAIRPORT" );
$DEPARTUREAIRPORT = $DEPARTUREAIRPORTs->item(0)->nodeValue;
$currencys = $data->getElementsByTagName( "currency" );
$currency = $currencys->item(0)->nodeValue;
$HOTELURLs = $data->getElementsByTagName( "HOTELURL" );
$HOTELURL = $HOTELURLs->item(0)->nodeValue;
$HOTELNAMEs = $data->getElementsByTagName( "HOTELNAME" );
$HOTELNAME = $HOTELNAMEs->item(0)->nodeValue;
$HOTELCATEGORYs = $data->getElementsByTagName( "HOTELCATEGORY" );
$HOTELCATEGORY = $HOTELCATEGORYs->item(0)->nodeValue;
if ($HOTELCATEGORY == '2*') $stars = '2s';
if ($HOTELCATEGORY == '3*') $stars = '3s';
if ($HOTELCATEGORY == '4*') $stars = '4s';
if ($HOTELCATEGORY == '5*') $stars = '5s';
$HOTELIMAGEs = $data->getElementsByTagName( "HOTELIMAGE" );
$HOTELIMAGE = $HOTELIMAGEs->item(0)->nodeValue;
$urls = $data->getElementsByTagName( "URL" );
$url = $urls->item(0)->nodeValue;[/code}