koolaid
12-13-2007, 11:49 AM
Hello,
What I'm trying to do here is show a URL to the user, however since it's actually one big 'word', in most browsers it falls out of the div. So that's why I tried PHP wordwrap.
$str = wordwrap($str, 70, "<br>\n", true);
HOWEVER I noticed that large characters like 'W' etc. fall out because they are bigger in Arial, so I think PHP counts the chars or something like that, because when I input 50 dots it cuts real soon (for the eye), and when I input 50 'W's (or other big characters) a huge chunk falls out of the div. I just want a static width, either with wordwrap or with something else (php/html), I'm open for suggestions.
Thank you.
What I'm trying to do here is show a URL to the user, however since it's actually one big 'word', in most browsers it falls out of the div. So that's why I tried PHP wordwrap.
$str = wordwrap($str, 70, "<br>\n", true);
HOWEVER I noticed that large characters like 'W' etc. fall out because they are bigger in Arial, so I think PHP counts the chars or something like that, because when I input 50 dots it cuts real soon (for the eye), and when I input 50 'W's (or other big characters) a huge chunk falls out of the div. I just want a static width, either with wordwrap or with something else (php/html), I'm open for suggestions.
Thank you.