This may be a nl2br() problem. If you are setting \n as your newline
character, it probably needs to be 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
ww
> If your viewing the output through a browser, try this;
>
> $text = "The quick brown fox jumped over the lazy dog.";
> $newtext = wordwrap( $text, 20, "");
> echo "$newtext\n";
> ?>
Ah, this is a better solution than mine -- I didn't know wordwrap had the
3rd (and 4th) parameters till now.
Jo
> 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
If your viewing the output through a browser, try this;
");
echo "$newtext\n";
?>
-Original Message-
From: Michael P. Carel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 21 February 2002 1:25 PM
To: php
Subject: [PHP] wordwrap not working
Hi,
Im testing the e
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
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:
it should print like this:
The quick brown fox
jumped over the
6 matches
Mail list logo