/ Published in: PHP
URL: http://digitalzoomstudio.net
You can use this code under MIT licence.
Expand |
Embed | Plain Text
function readXML($arg, $type) { $i=0; $xml = simplexml_load_file($arg); if($type=='main'){ foreach($xml->children() as $child) { if($child->getName()=="item"){ if($i==0) readXML('http://localhost/wordpress/?mode=xml&xmlfile=rotator.php&page=1', 'images'); $i++; } } } if($type=='images'){ $aux = '<div id="coinslider">'; foreach($xml->children() as $child) { if($child->getName()=="item") { $aux = $aux . '<img src="' . $child->file . '"/>'; } } $aux = $aux . '</div>'; echo $aux; } } readXML("http://localhost/wordpress/?mode=xml", "main");
You need to login to post a comment.
