Re: "Hard return" causing hangups
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: "Hard return" causing hangups

From: Peter van Schie <vanschie.peter@gmail.com>
Date: Sun Oct 30 2005 - 02:29:00 CEST

Jimmy Clay (www.songofthecoyote.com) wrote:

> My solution is to have PHP code remove all hard returns form the
> strings before they are stored in the database. But I'm not sure what
> the code would be for that.

Something like this would do the trick:

$strMessage = preg_replace("/\n|\r\n|\r/", "", $strMessage);

-- 
http://www.phpforums.nl
Received on Mon Nov 21 02:52:50 2005