database content 'one two' will not in any case match search string 'one two three four'.
What you're describing is an OR'ed search.
$searchwords = explode (' ', $searchstring);
foreach($searchwords as $test){
$orstring=" OR name LIKE '%$test%' ";
}
$query="SELECT * FROM mytable WHERE 1 $orstring;"
Will produce something like:
$query="SELECT * FROM mytable WHERE 1 $orstring;"
SELECT *
FROM mytable
WHERE 1
OR name LIKE '%one%'
OR name LIKE '%two%'
OR name LIKE '%three%'
etc...
PS
WHERE 1
is a place holder search clause that is always true, so you can start adding OR clauses.
Without it, it gets a little harder, as
WHERE ## Note missing 1 <<
OR name LIKE '%one%'
Will fail