0

I am getting the following error while trying to render the following code in PHP

"error on line 1 at column 37: parsing XML declaration: '?>' expected"

Can anyone of you tell me where I am doing wrong??

<?php header('Content-type: text/xml');
echo "<?xml version='1.0' encoding='UTF-8'";
echo "<bookshop orderid='5'>";
echo "<buyer>Ali</buyer>";
echo "<deliverto>";
echo "<country>Pakistan</country>";
echo "<city>Islamabad</city>";
echo "<address>Sector 11</address>";
echo "</deliverto>";
echo "<item>";
echo "<booktitle>Fairy Tales</booktitle>";
echo "<quantity>1</quantity>";
echo "<price>1200</price>";
echo "</item>";
echo "</bookshop>";
?>

0 Answers0