Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP wordwrap problems.

Participant ,
Jul 10, 2010 Jul 10, 2010

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.

TOPICS
Server side applications
460
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 10, 2010 Jul 10, 2010
LATEST

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/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines