I’ve followed the tutorial on the site but i can’t get it to format the data the way i need it here is the php code.
<?php
include_once"conn.php";
$query = "SELECT * FROM points ORDER BY id DESC";
$resultID = mysql_query($query) or die("Data not found.");
$xml_output = "<?xml version=\"1.0\"?>
";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= " '<marker>
";
$xml_output .= "lat=" .'"'. $row['lat'] .'"';
$xml_output .= "lng=" .'"'. $row['lng'] .'"';
$xml_output .= "title=" .'"'. $row['title'] .'"';
$xml_output .= "note=" .'"'. $row['note'] .'"';
}
$xml_output .= "</marker>";
echo $xml_output;
?>
and it outputs like this
’ lat="41.8905"lng="12.4925"title="Colosseo"note=“blog”
I need it to output like this
<marker lat=“41.8905” lng=“12.4925” title=“Colosseo” note=“blog” icon=""/>