How can I get the first n characters of a string in PHP? What\'s the fastest way to trim a string to a specific number of characters, and append \'...\' if needed?
if(strlen($text) > 10) $text = substr($text,0,10) . "...";