PDA

View Full Version : How to cut something off after a certain number of chars..?


Sean
29 Dec 2001, 02:06
I am just an questioning maching today, aren't I? ;)

Ok, well. I want to know how you cut some off...For example... I have this:


The dog went this way, the cat went that way. Then they both went the other way, and made their to to their houses. :D

Could it cut it like this:

The dog went this way, the cat we.....

Or, after so many characters?

Thanks,
Sean :D

Mark Hensler
29 Dec 2001, 06:25
substr() (http://www.php.net/manual/en/function.substr.php)

Sean
29 Dec 2001, 12:59
Thanks, just what i needed. :D

Murder-HE
04 Jan 2002, 19:16
Usefull when you display the latest threads on a Non-vB Page :)