ID:          24823
 Updated by:  [EMAIL PROTECTED]
 Reported By: curt at czirzow dot dyndns dot org
-Status:      Open
+Status:      Closed
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2003-07-26 19:06:07] curt at czirzow dot dyndns dot org

Description:
------------
function wordwrap:

----
Example 1:
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );
echo "$newtext\n";

Example 1 output:
The quick brown fox
jumped over the
lazy dog.
---

This is rather misleading to new users, they seem to be expecting their
output to be shown with carriage returns in html (since php defaults
with text/html mime-type.) Perhaps using a <pre> tag around output:

echo "<pre>$newtext</pre>"

Or using the break parameter in the function:

$newtext = wordwrap( $text, 20, '<br>');

This applies to both example 1 and 2.

Thanks.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24823&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to