PHP: A simple function to remove duplicate word in a string

PHP: A simple function to remove duplicate word in a string