<br /> is that XML style newline or something...

Don't worry about it, it parsed the same as <br>

Andrew
----- Original Message ----- 
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 06, 2002 1:13 AM
Subject: [PHP] nl2br returns <BR />? normality or a bug?


> 
> I've never seen that nl2rb would return me <BR /> instead of the
> traditional <BR>. But it did. 
> 
> Is that normal or it that a bug?
> 
> 
> Here's some test code:
> 
> <?
> 
> $text = "
> 
> Hello 
> 
> this is
> the 
> silliest
> 
> test
> 
> I can
> 
> 
> ever
> 
> invent
> 
> ";
> 
> echo nl2br($text);
> 
> echo "on machine: $SERVER_SOFTWARE";
> 
> ?>
> 
> 
> returns me such HTML:
> 
> ----------
> 
> <br />
> 
> <br />
> Hello 
> <br />
> 
> <br />
> this is
> <br />
> the 
> <br />
> silliest
> <br />
> 
> <br />
> test
> <br />
> 
> <br />
> I can
> <br />
> 
> <br />
> 
> <br />
> ever
> <br />
> 
> <br />
> invent
> <br />
> 
> <br />
> <p>on machine: [Apache-AdvancedExtranetServer/1.3.22 (Mandrake
> Linux/1.2mdk) mod_ssl/2.8.5 OpenSSL/0.9.6 PHP/4.0.6]
> ----------
> 
> 
> 
> I've triple-checked for what ANSI characters I had there. They were
> fine. And as you can read below, there were the same as when nl2br used
> to return me <br>.
> 
> The problem has never occurred to me on any of the previous machines
> site was hosted on. It does on this one though, with even the same
> version of PHP and the same data from DB. I've noticed this problem
> because I had a RegEx after nl2br() that always worked till we migrated
> on a new server, then my expression has obviously stopped to work
> because of that extra space and slash nl2br kindly provided me with.
> Temporarily fixed with another RegEx. But, I was wondering, is a known
> bug or it's because of my machine? Other than that nothing has
> changed...
> 
> Enlighten me on this, please. Did I miss a bug report?
> 
> 
> Sincerely,
> 
> Maxim Maletsky
> Founder, Chief Developer
> 
> PHPBeginner.com (Where PHP Begins)
> [EMAIL PROTECTED]
> www.phpbeginner.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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

Reply via email to