I was wondering if anyone could help me out, I\'m trying to find a script that will check my entire array and remove any duplicates if required, then spit out the array in t
Try this, it works with large arrays:
$original = array('one', 'two', 'three', 'four', 'five', 'two', 'four');
$filtered = array();
foreach ($original as $key => $value){
if(in_array($value, $filtered)){
continue;
}
array_push($filtered, $value);
}
print_r($filtered);
Outputs:
Array
(
[0] => one
[1] => two
[2] => three
[3] => four
[4] => five
)