I'm new at php so my question might seem pretty basic to some of you.
I am trying to parse an xml doc (a list of hotels) using php. The idea is to create a page for each city and then one per hotel.
What I am trying to do is to create some array_unique to get all hotel in which city on the city page.
Here are the codes I am using: Does anyone has a better solution?
$citydata = "";
foreach ($xmlfile->Hotel as $hotel){
$locationname = ($hotel->Location);
$uniquelocations = array_unique($locationname);
$citydata .= "".$uniquelocations."<br />";
}
Cheers,
Em.
Unique Variable in php
Moderator: General Moderators