<?php $string = 'Super this is a test this is a test'; $arr = explode(' ', $string); $vals = array_count_values($arr); foreach ($arr as $key => $word) { if ($vals[$word] > 1) { unset($arr[$key]); } } echo implode(' ', $arr);
You have javascript disabled. You will not be able to edit any code.