From: curt at czirzow dot dyndns dot org Operating system: PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: wordwrap example clarification
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 bug report at http://bugs.php.net/?id=24823&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24823&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24823&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24823&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24823&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24823&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24823&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24823&r=support Expected behavior: http://bugs.php.net/fix.php?id=24823&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24823&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24823&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24823&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24823&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24823&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24823&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24823&r=gnused -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
