for the tabs?
use Regular Expressions to do all that kind of jobs if you really need it:
$multiplier = 4;
$text = ereg_replace("\t", str_replace(' ', $multiplier), $text)
Or simply use our good-old <PRE> tag.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Jens Nedal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 9:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] re:linebreak
Hy there everyone on the board 8), just a new listviewer droppign in.
In case of displaying \n that are stored in a variable or com from a DB or
inptu field you can also use nl2br($var) which automatically converts those
linebreaks to <br> and so get displayed correctly. Though that will not work
for the tabs.
Jens
----------------------------------------------------------------------------
Ostry & Partner http://www.ostry.com
Hietzingerhauptstr. 145 1130 Vienna, Austria +43 1 877 74 54-18
on 14.02.2001 6:41 Uhr, Steve Werby at [EMAIL PROTECTED] wrote:
> "Deependra B. Tandukar" <[EMAIL PROTECTED]> wrote:
>> I did with <br>. "\r\n" too is not giving a new line.
>
> Actually "\n" does create a newline. If you view the source code of the
web
> page from the browser you'll see that it works. "\n" is not an HTML tag.
> It's not designed to create a newline in the HTML output sent to the
> browser. As you discovered, the <BR> tag will do that. Hope that is
clear.
> "\n" is typically used in PHP code so that when one looks at the HTML code
> sent to the browser one doesn't have to look at lines of HTML code that
> contain hundreds upon hundreds of characters.
>
> --
> Steve Werby
> COO
> 24-7 Computer Services, LLC
> Tel: 804.817.2470
> http://www.247computing.com/
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]