note 14341 added to function.htmlentities.php
| From: | les at keniston dot com | Date: | Fri, 27 Jul 2001 06:03:56 +0000 |
| Subject: | note 14341 added to function.htmlentities.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15896@lists.php.net to get a copy of this message | ||
To convert more characters to their equivalents, just use this:
function print_processor($value) {
$whats_coming_out =
array("]","[","!","\"","$","%","'","(",")","{","}","-",";","\\","/","<",">","*","+",".",":","_","=","^","\,","|","
","?");
$whats_going_in =
array("]","[","!",""","$","%","'","(",")","{","}","-",";","\","/","<",">","*","+",".",":","_","=","^","‚","|"," ","?");
for ($i=0;$i<count($whats_coming_out);$i++) {
$value = str_replace ($whats_coming_out[$i], $whats_going_in[$i], $value);
}
return $value;
}
http://www.php.net/manual/en/function.htmlentities.php