I have an array with comma separated numbers and I want to remove all duplicated numbers. Is the approach below the best choice or is there a smarter one?

```
$filter_tags_array[] = '4,6,2,5,8';
$filter_tags_array[] = '6,8,1,3,5,7,2,4';
$filter_tags_array[] = '2,4,1,3,5';
$filter_tags_array[] = '6,3,5,8,2,4';
$filter_tags_array[] = '2,8,11,4,9,12';
$filter_tags_array[] = '9,11,2,8,10,12,4';

$tags_id = '';
foreach($filter_tags_array as $filter_tags) {
  $tags_id .= $filter_tags . ',';
}

$tags_id = implode(',', array_unique(explode(',', $tags_id)));

echo "<pre>";
print_r($tags_id);

```

**print\_r results: 4,6,2,5,8,1,3,7,11,9,12,10,**