View Full Version : wordwrap() help please

06-27-2010, 12:13 AM
So I wrote this to make my strings "format" themselves:

$text = "This is a test string that's being formatted!";
$newtext = wordwrap($text, 20, "<br />");
echo $newtext;

The problem I'm facing is that it correctly formats strings like this:

This is a test string that's being formatted!

But it completely ignores strings like this:


What can be done about this? Thanks

06-27-2010, 01:56 AM
Set wordwrap's fourth argument to true, this will force a cut in the middle of a string.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum