Re: Re: how to format the output of the text info that user uploaded?

From: Date: Mon, 19 Aug 2002 02:40:48 +0000
Subject: Re: Re: how to format the output of the text info that user uploaded?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21223@lists.php.net to get a copy of this message
If the method they use to "upload" involves pasting the text into an HTML textbox, I usually do this: replace all occurances of \n with <br>. Look into the ereg_replace() function in the manual or at php.net for more info, but that is some limited formatting. If you need further formatting, like someone else pointed out, you'll need to post more info. --- David Robley <robleyd@paradise.net.nz> wrote: > In article > <20020818202235.19639.qmail@pb1.pair.com>, > bo1st@hotmail.com > says... > > I have a field in a form which allows user to > upload thier biographys.Once > > they upload a bunch of texts,the script I wrote > automatically show it on a > > webpage, however, the contents are all scrambled > toghther without line break > > and formatting.. > > How am I able to show the formatted outputs? > > > > I tried to use <pre> </pre>, but it didn't work > well. > > > > Any suggestions? > > For linebreaks, see nl2br(). In respect of > formatting, you would only > expect html tags to be rendered by a browser - if > you mean some other kind > of formatting, perhaps you could provide further > information. > > -- > David Robley > Temporary Kiwi! > > Quod subigo farinam > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com

« previous php.db (#21223) next »