I have a PHP script that echo's a string into an html div
.
The div has room for only 50 chars in width, so if the string is longer, I have to cut it in to how ever many lines it takes.
So I can use strlen
to see where I should be cutting the string and echo a <br>
. Problem is, I don't want to cut it in the middle of a word.
I had a solution in mind, but it seems that i'm over complicating this.
Thanks,