note 8071 deleted from trim by ronabop

From: Date: Sun, 27 Aug 2000 11:34:46 +0000
Subject: note 8071 deleted from trim by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-3460@lists.php.net to get a copy of this message
Sorry, <br$gt; were cut out, here's the code again. function replace_nl($string) { // cut the value up by n's $lines = explode (" ", $string); $index=0; while($lines[$index]) { $lines[$index] = trim($lines[$index]); if(substr($lines[$index], strlen($lines[$index]) - 4, 4) != "<br>") $lines[$index] .= "<br>"; $return_result .= $lines[$index]; $index++; } return $return_result; }

« previous php.notes (#3460) next »