RE: [PHP] wrapping problem continued
| From: | Jay Blanchard | Date: | Wed, 24 Aug 2005 15:16:46 +0000 |
| Subject: | RE: [PHP] wrapping problem continued | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-221275@lists.php.net to get a copy of this message | ||
[snip]
Have been given the solution and applied it to the code
<?php $new_string = wordwrap($row['fname'], 20, "<br />\n");echo
$new_string; ?>
Why does it not work?
What is the output of the echo statement?
An unwrapped string the same as before.
[/snip]
Because you didn;t follow the instructions on
http://www.php.net/wordwrap ...set the cut (4th parameter
of wordwrap
<?php $new_string = wordwrap($row['fname'], 20, "<br />\n", 1);echo
$new_string; ?>