Originariamente inviato da serialkiller


codice:
function xmlentities ( $string ) {
    $ar1 = array ( '&' , '"', ''' , '<' , '>' );
    $ar2 = array ( '&', '"', "’", '<', '>' ) ;
    return str_replace ( $ar1 , $ar2 , $string );
}
ma &amp;quote; non dovrebbe essere sostituito in &amp;#34; (e così tutti gli altri)?

sti maledetti caratteri non li sopporto più..