- var_dump: documentation ( source)
- explode: documentation ( source)
- in_array: documentation ( source)
- join: documentation ( source)
<?php
$a = "1385|1385|1385|1373|1373|1385|1373|1373|1373";
$b = explode("|", $a);
$c = [];
foreach($b as $id){
if (!in_array($id, $b))
$c[] = $id;
}
var_dump(join("|", $c));