<?php

// your code goes here

$initial_string = "abab sbs abc ffuuu qwerty uii onnl ghj";

// Remove words
$result_string = preg_replace('/\b(?=\w*(\w)\w*\1)\w+/', '', $initial_string);

// Clean spacing, because the string currently looks like '  abc  qwerty   ghj'
$result_string = trim(preg_replace('/\s+/', ' ', $result_string));

print_r("Initial String:\n$initial_string\nBecomes:\n$result_string\nMAGIC!\n\n");

// Or, another way

// Extract all non-repeating character words.
preg_match_all('/\b(?!\w*(\w)\w*\1)\w+/', $initial_string, $matches);

// Glue them all together with a space in-between
$result_string = implode(' ', $matches[0]);

print_r("Initial String:\n$initial_string\nBecomes:\n$result_string\nMAGIC!\n\n");
