get unique value from XML array
- April 1st, 2009
- Posted in php
- Write comment
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));
}
}
No comments yet.