View Single Post
Old 01-11-2008, 02:48 AM   #7 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Quote:
Originally Posted by coiyeun2b View Post
Hi @bluesaga. I'm just test:
PHP Code:
//include your function
$str "Lol! Be nice to Salathe. He's only helping everyone out and that's why we're here.";
echo 
limitString($str50'...');
//output: Lol! Be nice to Salathe. He's only helping ever 
You can see, the word "everyone" had split to "ever" and "yone". I think you can improve function,it get the space near 50 (character) and split at this point. Output return like:

or
That would be lovely I do have some functions in my various projects for this! But maybe you'd care to have a stab at it? Flaunt your stuff!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote