Skip to main content
Inspiring
July 10, 2010
Question

PHP wordwrap problems.

  • July 10, 2010
  • 1 reply
  • 461 views

Hi,

There are sections on my website that use the wordwrap() function, but unfortunately wordwrap seems to have a hard time with a lot of text. For example this is quoted directly from my site:

"Hey, it's ***, aka *** from Youtube and everywhere else =P I'm usually

not

on here, so if you want to get in contact, try Youtube cuz I'm on there more often. xD"

Why is wordwrap only putting one word on the second line? Any help would be appreciated.

This topic has been closed for replies.

1 reply

Known Participant
July 10, 2010

Take a look at 2 things:

1. the PHP function nl2br() @ http://php.net/manual/en/function.nl2br.php.

2. use css 3 to handle the wrap @ http://www.css3.com/css-word-wrap/