[php]header(‘Content-Type: text/xml’);
// Iterate through the rows, adding XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE
$node = $dom->createElement(“marker”);
$newnode = $parnode->appendChild($node);
$newnode->setAttribute(“name”,$row[‘name’]);
$newnode->setAttribute(“address”, $row[‘address’]);
$newnode->setAttribute(“lat”, $row[‘lat’]);
$newnode->setAttribute(“lng”, $row[‘lng’]);
$newnode->setAttribute(“type”, $row[‘type’]);
$newnode->setAttribute(“event”, $row[‘event’], htmlentities(), ENT_QUOTES, “utf-8”);
$newnode->setAttribute(“link”, $row[‘link’]);
}
echo $dom->saveXML();
?>[/php]
Basically the the ‘event’ row has information that needs to be using utf-8 but trying to figure out how to use the htmlentities correctly.
Any help would be greatly appreciated.