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 feo on 02/22/06 17:39

See nl2br (); This function replaces new line character with HTML <br />.

feo

"noone" <noone@noone.com> escribiσ en el mensaje
news:dtekqq$30a$1@emma.aioe.org...
> 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?
>
> Example: I keyed in the following into the field:
>
> My name is John.
> I am 3 feet tall.
> I am the tallest in my class.
>
>
> But when i display it, the data looks like this:
>
> My name is John. I am 3 feet tall. I am the tallest in my class.
>
>
> TIA
>
>
>

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация