get unique value from XML array
this should work best as far as I know and tried..I used the serialize because oddly it couldnt compare strings
hope it maybe help someone there that needs it
$new=array();
$exclude = array("");
foreach ($myItems as $item)
{
if (!in_array(serialize($item->fileName) ,$exclude))
{
$new[] = $item;
array_push($exclude, serialize($item->fileName));
}
}
This entry was posted on Wednesday, April 1st, 2009 at 9:08 am and is filed under php. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
