The code below gives me a listing of the image links, but I want to display the images. They come from an XML file that contains CDATA. They need to be displayed in an HTML format, which explains the echo at the end.
I'm new to this and have no idea for a solution.
<?php
$html= "";
$url = "xml/test.xml";
$xml = simplexml_load_file($url);
for ($i = 0; $i < 10; $i++){
$dealer_logo = $xml->dealers->id[$i]->logo;
echo $dealer_logo[0][$url];
$html .= "$dealer_logo";
}
echo $html
?>
Wrap each url in the appropriate image tag.
<img src=\"$dealer_logo[0][$url]\" />
"Displaying an image" in an HTML page is really no different from "linking to it" - you put the URL into the appropriate bit of HTML markup, and the browser does the rest.
$html .= '<img src="' . htmlspecialchars($dealer_logo) . '>';
This really has nothing to do with where the URL comes from though, and is a very basic piece of HTML, so I wonder if I'm misunderstanding your question.