![]() |
How to detect if keyword is too long
Hello, in my site's comments page, sometimes users write comments like
Hfgdgggggggggggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggggggggggggggggggggg ggggggggggggggggggg and that crashes my template. Is there anyway to detect and remove that sh*t ? Thanks! |
thats where the & shy ; (no spaces between) character comes into play. It will split a word if its to long. Use php to insert it into words longer then some length.
alternatively just add a css property or overflow:hidden; |
Thanks. Gonna try these.
|
PHP Code:
|
Realllly? Somebody spent the time to make wordwrap() a core function in PHP?
|
It's from one of the early versions of PHP4, PHP3 was still being maintained when wordwrap was introduced if memory serves.
Back then the language was for little more than adding stat counters (hyperbole of course) |
| All times are GMT. The time now is 03:53 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0