Small example error on wordwrap

From: Date: Sat, 26 Jul 2003 17:03:31 +0000
Subject: Small example error on wordwrap
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969355475@lists.php.net to get a copy of this message
hello, I'm not sure where the best place to post a fix in the documentation. Should I attach a note to the documentation or submit a documentation bug at bugs.php.net? btw, I've been considering joining the php-doc team. I'm just curious if you guys are in need for another person? At this point I've just been poking around the documentation system and seeing how every thing is done before committing myself. The documentation error is as follows: 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, Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.doc (#969355475) next »