Topic: Shopping cart tutorial
Hey all, I have been trying to do the Shopping cart tutorial and have gotten to a point where its not working how it says it should in the video. below i've posted the code that i've used so if someone can tell me what i'm doing wrong that would be great.
thanks in advance
index.php
<?php
require_once '../functions/functions.php'
$xml = new SimpleXMLElement(file_get_contents(STORE_XML_FILE));
foreach($xml as $product)
{
echo "<li>$product->title</li>";
}
?>catalog.xml
<?xml version="1.0" encoding="UTF-8"?>
<items>
<product>
<id>TOMATOSOUP</id>
<title>Tomato Soup</title>
<description> Freshly-made Tomato Soup in a can</description>
<img>http://www.ayushveda.com/dietfitness/wp-content/uploads/2008/07/tomatosoup.jpg</img>
<price>1.33</price>
</product>
<product>
<id>PASTA</id>
<title>Linguini</title>
<description>real authentic lunguini</description>
<img>http://www.cookworm.com/images/linguini-chickpeas-lemon02.jpg</img>
<price>2.55</price>
</product>functions.php
<?php
/** DEFINE GLOBALS **/
define('STORE_XML_FILE' , '../catalog.xml');
?>Its just displaying a blank screen instead of the <li> items

