note 23926 added to function.utf8-encode

From: Date: Thu, 01 Aug 2002 15:50:28 +0000
Subject: note 23926 added to function.utf8-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-34092@lists.php.net to get a copy of this message
To write an XML element $title containing "exotic" (eg. non ASCII é & à ñ...) 2 solutions I found : Fastest : $xml .= "<title><![CDATA[" . $title ."]]></title>\n" or cleanest : $xml .= "<title>".utf8_encode(htmlspecialchars($title))."</title>\n" After that, your xml can be parsed without errors. -- http://www.php.net/manual/en/function.utf8-encode.php http://master.php.net/manage/user-notes.php?action=edit+23926 http://master.php.net/manage/user-notes.php?action=delete+23926 http://master.php.net/manage/user-notes.php?action=reject+23926

« previous php.notes (#34092) next »