08.10.2015, 18:54
You can use split.
PHP код:
$testString = "Lunoxx sold a car."; //Set the string to a test.
$splitText = explode(' ', $testString); //Now the actual code to split it from spaces.
//Now use it.
echo $splitText[0]; //Will print "Lunoxx"