The obvious answer would be :
string substr ( string string, int start [, int length])
but it's a bit rude to cut words out so what I do is :
$sql = "SELECT CONCAT(SUBSTRING_INDEX(blah.text, ' ', 5),'...') as blahtext FROM blah";
This will return the 5 first words and add "..." to the end.