mrtc Posted February 7, 2015 Share Posted February 7, 2015 Hello i need help to make a product display page from xml file .... any one who can help me thanks i got an xml file products.xml <PRODUCT> <PRODUCTS_NAME>Name of the product</PRODUCTS_NAME> <PRODUCTS_DESCRIPTION>Details of the products.</PRODUCTS_DESCRIPTION> <PRODUCTS_IMAGE>1111.jpg</PRODUCTS_IMAGE> <PRODUCTS_PRICE>44$</PRODUCTS_PRICE> </PRODUCT> ok i used this code to get information of all the product name on the page <?php $xml=simplexml_load_file("products.xml") or die("Error: Cannot create object"); foreach($xml->children() as $products) { echo $products->PRODUCTS_NAME. "<br>"; } ?> its show all product name line by line ok so all i want to show full product one by one ... For example ( Product image | then product name | Then product price | Then product details ) Thanks for your help in advanced waiting for your answers Quote Link to comment Share on other sites More sharing options...
Barand Posted February 8, 2015 Share Posted February 8, 2015 So output the others as you did with the product name, putting the <br> after the details output. The image will require an <img src="imagename" /> tag Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.