Re: eliminate <enter> keyword

From: Date: Wed, 28 Jul 2004 00:00:18 +0000
Subject: Re: eliminate <enter> keyword
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192046@lists.php.net to get a copy of this message
On Tue, 27 Jul 2004 18:29:42 -0500, Raúl Castro <ora7@cdmb.gov.co> wrote: > Hello, > > I have a form with a textarea field, I'm trying to eliminate the <enter> keywords > that users write on it, what can I do using php? for instance: the original phrase would be: > "Hello <enter> world!" > after using a function php must be: "Hello world!". > If you don't want newlines, don't use a textarea..... But it you really want it: $text = str_replace(array("\n", "\r"), ' ', $text); -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#192046) next »