So I have this simple code:
foreach($items as $index=>$item)
{
echo "<strong>Item " . $index+1 . " (" . $item[0]->getNamedItem('name')->nodeValue .")</strong>";
}
$items
has only 1 item for now, which is an array of DOMDocument data from an XML file.
$item[0]->getNamedItem('name')->nodeValue
is "purchase";
However, the HTML printed is:
1 (purchase)
Why is this, and how can I correct it?
Thanks, ~Hom