Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Devon Denim Jacket

ID: 3852333 • Letter: D

Question

Ok my first question was not answered correctly so here is my second attempt I need to create a wildlife image gallery page with PHP using an XML configuration file. It has to have 32 wildlife pics 31 jpg pics and 1 Png pic. Can i get help with this code can you make it readable and make sure it works.

Thanks.

Explanation / Answer

So i managed to find out the answer .. the if function need to be inserted inside the foreach function which i didnt put it before .. ?php $productID = $_GET['product_id']; $xml = simplexml_load_file("product.xml"); $searchedproduct = $xml->xpath('/products/product[product_id="'.$productID.'"]'); foreach($searchedproduct as $productinfo){ foreach ($productinfo as $productdetail){ if($productdetail->getName($image) == 'image_path'){ echo '
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote