Re: re:linebreak

From: Date: Thu, 15 Feb 2001 00:13:52 +0000
Subject: Re: re:linebreak
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39779@lists.php.net to get a copy of this message
"Jens Nedal" <jnedal@ostry.com> wrote: > 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. Good call, Jens. > Though that will not work > for the tabs. For tabs something like this will probably give a tolerable result, though I've never had a need to try: $var = str_replace( "\t", str_repeat( "&nbsp;", 4 ), $var ); -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/

« previous php.general (#39779) next »