You are here: Re: How to display longtext in <textarea> format « All PHP « IT news, forums, messages
Re: How to display longtext in <textarea> format

Posted by noone on 09/28/24 11:40

Hi,

Many thanks. It works perfectly.

cheers

"J.O. Aho" <user@example.net> wrote in message
news:4604utF8fgu6U2@individual.net...
> noone wrote:
> > Hi,
> >
> > I've saved some data in MySQL in a field of type LONGTEXT. How can i
display
> > the data in <textarea> format, ie. with the <LF> or <CR> in the original
> > places?
> >
> > I can only display the field in <textarea> format only when i use a
form,
> > but i do not want to allow users to edit the data.
> >
> > Is there any other way to display the data correctly?
>
> <pre>
> <?PHP echo $longtext_data; ?>
> </pre>
>
> or
>
> <?PHP echo nl2br($longtext_data); ?>
>
>
> //Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация