im new to this. i just want 1 item displayed at a time from stock xml

Here is our current inventory and pricing.


[php] <?php $file="stock.xml"; $xml = simplexml_load_file($file) or die("Cannot load stock.xml"); $lastCat = 'none'; foreach ($xml->Item as $ni){ if ($lastCat != trim($ni->Cat)) { $lastCat = trim($ni->Cat); echo ''; } echo ''; } ?> [/php]
  </table>
</div>

[code]

Gearing
Shimano 18t freewheel
4
10.00


Gearing
Dicta 17t freewheel
5
10.95


Gearing
Dicta 18t freewheel
2
10.95


Gearing
Four prong remover
17
10.99


Gearing
Shimano chain
20
13.95


Gearing
Yaban chain
21
10.95


Gearing
Ventura chain
40
9.95


Gearing
Link extractor
28
8.95

<Item>
	<Cat>Saddles</Cat>
	<Desc>Vader</Desc>
	<Qty>26</Qty>
	<Price>14.95</Price>
</Item>
<Item>
	<Cat>Saddles</Cat>
	<Desc>Handsome dog</Desc>
	<Qty>23</Qty>
	<Price>12.95</Price>
</Item>
Miscellaneous The pink stuff 6 4.95 Miscellaneous Mighty glasses 3 2.95 Miscellaneous Clear glasses 13 1.95 Miscellaneous Welsh sports bag 21 11.95 [/code]

Inventory

Quantity

Price

'.$ni->Cat.'
'.$ni->Desc.' '.$ni->Qty.' '.$ni->Price.'
Sponsor our Newsletter | Privacy Policy | Terms of Service