note 10364 rejected and deleted from nl2br by zak

From: Date: Sat, 30 Dec 2000 00:04:46 +0000
Subject: note 10364 rejected and deleted from nl2br by zak
Groups: php.notes 
Request: Send a blank email to php-notes+get-9218@lists.php.net to get a copy of this message
I also had a problem where the return of a variable using n2blr would stop at a single quote. The following input ------------------- It is Jim's job to work with PHP ------------------- Would show up as this --------------------- It is Jim --------------------- So, I added this line to my n2blr code $variable = ereg_replace("'", "'", $variable); /* ' is for the single quote */ So that the full code is; $variable = nl2br($variable); $variable = ereg_replace("n", "", $variable); $variable = ereg_replace("r", "", $variable); $variable = ereg_replace("'", "'", $variable); There may be a better way to do this, but so far, this has worked fine for me.

« previous php.notes (#9218) next »