Re: textarea data and printing
| From: | Benjamin Walling | Date: | Thu, 13 Mar 2003 14:36:04 +0000 |
| Subject: | Re: textarea data and printing | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26350@lists.php.net to get a copy of this message | ||
Not really sure what you are asking. Do you want to remove the line breaks
from the textarea entry? Use str_replace("\n","",$user_input);
str_replace("\r","",$user_input); to remove them.
If you want the user to be able to use the enter key to format the
description, you will have to replace "\n" with <BR> when you display it
back. HTML ingores whitespace, so "\n" accomplishes nothing.
"Rajesh Fowkar" <Mail@dempos.com> wrote in message
news:20030313054212.GA1025@ho.dempos.com...
> Hi,
>
> We are accepting Detailed description of the item in
> <Textarea></Textarea>.
>
> Is there any function which can return full words without breaking the
> lines. The data is stored in a PostgreSQL database in varchar field.
>
> item_detail_description varchar(200)
>
> I am assuming that the user need not press the 'enter' key at the end of
> each line. Hence by using the 'carriage return' code this function
> cannot be written. I was interested in knowing if any such function
> already exists.
>
> Thanks in advance.
>
> Peace
>
> --
> Rajesh
> :
> ####[ GNU/Linux One Stanza Tip (LOST) ]#######################
>
> Sub : Locating a command (whereis) LOST #126
>
> To locate the binary, source, and manual page for a command,
> try : whereis <command> [e.g. whereis man]. See man pages for
> detailed filter options)
> For merely knowing where it lies: which <command>
>
> ####<mithun.b@egurucool.com>##################################
> :