Posted by Chung Leong on 01/01/06 04:38
I usually use a regular expression so that I'm not breaking in the middle of a word: preg_match('/^.{0,400}\b/s', $text, $m); $text_shorten = $m[0];
[Back to original message]
Copyright © 2005-2006 Powered by Custom PHP Programming