note 37890 added to function.str-replace

From: Date: Mon, 01 Dec 2003 14:21:51 +0000
Subject: note 37890 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-61208@lists.php.net to get a copy of this message
For those that are trying to replace newlines and `weird' chars with the correct HTML chars, have a look at these two functions: http://www.php.net/manual/en/function.htmlentities.php converts all chars to &code; like codes. http://nl2.php.net/manual/en/function.nl2br.php converts all sort of enters to a nice (X)HTML compatible <br /> followed by a \n (enter). These two functions should fix up your code and display it properly real easily :) ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37890 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37890&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37890&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61208) next »