wordwrapping
Moderator: General Moderators
-
HiddenS3crets
- Forum Contributor
- Posts: 119
- Joined: Fri Apr 22, 2005 12:23 pm
- Location: USA
wordwrapping
Wordwrap doesn't work if there is a very long string with no spaces in it. Thus, the wordwrap function becomes ineffective. How can I fix this so it will break a long string anyways?
According to the manual this produces:
this:
Teh boolean cut parameter must be set to 1.
Code: Select all
<?php
$text = "A very long woooooooooooord.";
$newtext = wordwrap($text, 8, "\n", 1);
echo "$newtext\n";
?>Code: Select all
A very
long
wooooooo
ooooord.