What im looking to do is sort an array and delete multiple duplicates, heres what ive got:Im using PHP Simple HTML DOM Parser to draw in an XML file and turn it into an array, the XML is formated like this:\[code\]<Row> <Cell ss:StyleID="s17"><Data ss:Type="String">Last Name</Data></Cell> <Cell ss:StyleID="s17"><Data ss:Type="String">First Name</Data></Cell> <Cell ss:StyleID="s17"><Data ss:Type="String">Address</Data></Cell> <Cell ss:StyleID="s17"><Data ss:Type="String">City</Data></Cell> <Cell ss:StyleID="s17"><Data ss:Type="String">Province</Data></Cell> <Cell ss:StyleID="s17"><Data ss:Type="String">Postal Code</Data></Cell> <Cell ss:StyleID="s17"><Data ss:Type="String">Year</Data></Cell></Row>\[/code\]im looking to combine the cells first and last name and then compare then to the rest of the array. \[code\]function search($array, $key, $value){ $results = array(); if (is_array($array)) { if (isset($array[$key]) && $array[$key] == $value) $results[] = $array; foreach ($array as $subarray) $results = array_merge($results, search($subarray, $key, $value)); } return $results;}$simple = file_get_html('DOM/mail.xml');$i = 0;foreach($simple->find('row') as $article) { $item['name'] = $article->find('cell', 0)->plaintext.' '.$article->find('cell', 1)->plaintext; $item['address'] = $article->find('cell', 2)->plaintext; $item['city'] = $article->find('cell', 3)->plaintext; $item['province'] = $article->find('cell', 4)->plaintext; $item['postal'] = $article->find('cell', 5)->plaintext; $item['year'] = $article->find('cell', 6)->plaintext; $item['count'] = $i; $i++; $articles[] = $item;}$a[] = "Buckley Terry";$a[] = "test bar";$a[] = "Grills Levi";foreach ($a as $test) { $b[] = search($articles, 'name', $test);}print_r($b);\[/code\]but all this does is return multiple instances of name. i.e if there is only one entry it will return it. Any help would be awesome.