rockinaway Posted April 19, 2007 Share Posted April 19, 2007 How can I break long words up, I tried wordwrap, but it didn't work.. anything else I can try.. Quote Link to comment https://forums.phpfreaks.com/topic/47788-break-long-words-up/ Share on other sites More sharing options...
Ninjakreborn Posted April 19, 2007 Share Posted April 19, 2007 Go to php.net and check the term "wordwrap()" look in the user notes and you will see a lot of functions that do it a lot more affectively than the standard implementation of just "wordwrap" Quote Link to comment https://forums.phpfreaks.com/topic/47788-break-long-words-up/#findComment-233464 Share on other sites More sharing options...
Nameless12 Posted April 19, 2007 Share Posted April 19, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/47788-break-long-words-up/#findComment-233470 Share on other sites More sharing options...
inversesoft123 Posted February 25, 2010 Share Posted February 25, 2010 its batter if you break text with paragraphs aor explode its from fullstops. Quote Link to comment https://forums.phpfreaks.com/topic/47788-break-long-words-up/#findComment-1017904 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.