note 58863 modified in function.htmlentities by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 17:01:16 +0000 |
| Subject: | note 58863 modified in function.htmlentities by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154925@lists.php.net to get a copy of this message | ||
A version of the xml entities function below. This one replaces the "prime" character
(â²) with which I had difficulties.
<?php
// XML Entity Mandatory Escape Characters
function xmlentities($string) {
return str_replace ( array ( '&', '"', "'",
'<', '>', '�' ), array ( '&' ,
'"', ''' , '<' , '>',
''' ), $string );
}
?>
--was--
A version of the xml entities function below. This one replaces the "prime" character ()
with which I had difficulties.
// XML Entity Mandatory Escape Characters
function xmlentities($string) {
return str_replace ( array ( '&', '"', "'",
'<', '>', '' ), array ( '&' ,
'"', ''' , '<' , '>',
''' ), $string );
}
http://php.net/manual/en/function.htmlentities.php