Hi All
i have an xml file which i am trying to get a list of unique 'binding' field.
here is my code
i tried adding a unique array to the $prodBinding field but as its not an array it doesnt work, whats the correct way do do this?
many thanks
i have an xml file which i am trying to get a list of unique 'binding' field.
here is my code
PHP Code:
$latest = simplexml_load_file('all_dvds.xml');
foreach ($latest->film as $film)
{
$prodID = $film->id;
$prodName = $film->name;
$prodBinding = $film->binding;
$prodReleaseDate = $film->release_date;
$prodAge= $film->age_rating;
$prodRRP = $film->rrp;
$prodIMG = $film->image;
$prodCheapest = $film->cheapest;
$cat = array_unique($prodBinding);
print_r($cat);
if($store_count ==1)
{?>
<div>
<a href="<?php echo $storeLink?>" title="Click to see related product(s) / retailer and apply code">
<div class="store_logo"><img src="<?php echo $storeLogo?>" alt="<?php echo $storeName?>" title="<?php echo $storeName?>" height="32" border="0" /></div>
</a>
<div class="description"><?php echo $storeDescription?></div>
</div><?php
$store_count++;
}
}?>
many thanks
Comment