I am trying to print a table with the list of customer oder from data retrieved from an xml file. I think my attempt at retrieving data has failed as it did not show anything. I also wanted to add two buttoms at the end of each order (delet and edit):
<?php
// Loading the XML file
$xml = simplexml_load_file("database/orderlist.xml");
echo "
<div style='overflow-x:auto;'>
<table id='order'>
<tr>
<th>Order #</th>
<th>Customer ID# </th>
<th>Items</th>
<th>Total Prices (CND)</th>
</tr>
foreach($xml->children() as $ftpxml)
{
echo '<td>".$ftpxml->attributes()->id."</td>';
echo '<td> ".$ftpxml->attributes()->customerID." </td>';
echo '<td>".$ftpxml->attributes()->products." </td>';
echo '<td>".$ftpxml->attributes()->totalprice." </td>';
echo '<a href="backStoreOrderProfile.html" ><button class="btn Edit" id="btn" input value="Check" type=submit > Edit </button></a>';
echo '<button class="btn Delete" id="btn" input value="Check" type=submit > Delete</button></td>';
}
</table>
</div>
";
?>
'<td>'and ALL "</td>' to'</td>'please