[PHP] wordwrap not working

2002-02-20 Thread Michael P. Carel
Hi, Im testing the example in the http://www.php.net/manual/en/function.wordwrap.php and it seems not working it still printing the whole word and not wrapping. Im using php4.05 in my redhat 6.2 using an apache. Here's the sample: ? $text = The quick brown fox jumped over the lazy dog.;

RE: [PHP] wordwrap not working

2002-02-20 Thread Martin Towell
Are you looking at the output in a web browser? Martin -Original Message- From: Michael P. Carel [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 2:25 PM To: php Subject: [PHP] wordwrap not working Hi, Im testing the example in the http://www.php.net/manual/en

RE: [PHP] wordwrap not working

2002-02-20 Thread David Redmond
Subject: [PHP] wordwrap not working Hi, Im testing the example in the http://www.php.net/manual/en/function.wordwrap.php and it seems not working it still printing the whole word and not wrapping. Im using php4.05 in my redhat 6.2 using an apache. Here's the sample: ? $text = The quick brown

Re: [PHP] wordwrap not working

2002-02-20 Thread Joel Boonstra
snip it should print like this: The quick brown fox jumped over the lazy dog. but it still printing like this: The quick brown fox jumped over the lazy dog. HTML treats bunches of whitespace as one space. Look at the source of the page; you'll see that it's doing what it should. If you

RE: [PHP] wordwrap not working

2002-02-20 Thread Joel Boonstra
If your viewing the output through a browser, try this; ? $text = The quick brown fox jumped over the lazy dog.; $newtext = wordwrap( $text, 20, br); echo $newtext\n; ? Ah, this is a better solution than mine -- I didn't know wordwrap had the 3rd (and 4th) parameters till now. Joel --

Re: [PHP] wordwrap not working

2002-02-20 Thread Steven Walker
This may be a nl2br() problem. If you are setting \n as your newline character, it probably needs to be br if your just echoing it. Depending on where it ultimately gets displayed, you'll want one or the other. For example, sending an email message you want \n. Steven J. Walker Walker Effects