Jump to content

Break long words up


rockinaway

Recommended Posts

wordwrap($text, $textarea_width_in_chars, "<br />\n", true);

 

this should work, you need to put the true value on the end to cut words but if you are trying to cut individual words wordwrap is really the wrong function to use. If wordwrap isnt what you want then try the below

 

substr($word, 0, 5) //this limits the word to 5 chars

Link to comment
https://forums.phpfreaks.com/topic/47788-break-long-words-up/#findComment-233470
Share on other sites

  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.