Forum Moderators: coopster
We know that using substr()directly in PHP
or in a MySQL query ,SUBSTRING('my_var', 0,100) as 'text', etc.. will result in word breaking
While I was searching the manual I found a user ()
that does a perfect job
so visit it HERE [us2.php.net]
scroll down to the 3rd post and look for strtrim()
a well done demo and useful :)
...for those interested in other solutions, similar to jatar's :)
[edited by: eelixduppy at 9:37 pm (utc) on Jan. 3, 2007]