Re: Large text fields

From: Date: Thu, 02 Nov 2000 17:26:26 +0000
Subject: Re: Large text fields
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23429@lists.php.net to get a copy of this message
Maxim wrote: > No, <pre></pre> would output the whole paragraph in a single line each. Under what conditions? My only php project has been one very similar in concept to what Claus is doing ( www.knifepoints.com -> search ), so my experience is limited, but it does contradict your assertion. I cut and paste chunks of text into a <textarea>, insert them into a mysql db and then return them as search results. I put <pre> tags around the output, and it comes out the same way it went in. That's a pretty cool class you wrote and the possibility of using it sent me running to check my own code. The only unbroken lines in my search output are where the lines went in unbroken. I don't see where class max_Organizer would help me there. I can't see why I'd want to use a server side solution to replace formatting that is already there for the client to use. Please enlighten me. Russell > I use (for articles) a class, that uses RegEx changing every "\n" (more then > juts \n - newline) to "\n<BR>" and every "\n<BR> (spaces, tabs, > newlines) > \n<BR>" \n\n<P> > > in this way the output look real cool and the database can be reused just by > a simple substring() of <BR> and <P> 's. > I input it like this already in the database since RegEx are slow and > because I like to make HTTP request some faster. > > Here's the class I use: > > I think you can easily figure out how to use it: > If got any problems do not hesitate to ask me. (might not reply till next > Monday) > > Cheers! > class max_Organizer snipped> > Use <pre></pre> tags around the output > Russell > > > Hi, > > > > I am working on a website using php3 and mySQL. On one page in the site > > administration is inputting new articles, via a form, with fields such as > > $title, $date, $article, etc. These are then passed to mySQL, to be viewed > > on another page by users. > > > > This all works fine, except for the text of the article itself. When the > > text is typed in to the textfield on the form, it exist of several > > paragraphs, with blank lines in between, but when it is viewed from the > > database on another page all the paragraph breaks and blank lines are > gone, > > and all the text is displayed in just one long continued block. > > > > What do I do to preserve the format in which the text is typed? With the > > different paragraf breaks and blank lines? > > > > Thanks for the help! > > > > Claus > > > >

« previous php.general (#23429) next »