/ Published in: PHP
You can use this code under MIT licence.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function readXML($arg, $type) { $i=0; if($type=='main'){ foreach($xml->children() as $child) { if($child->getName()=="item"){ echo "<h3>" . $child->title . "</h3>"; 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 . '</div>'; echo $aux; } } readXML("http://localhost/wordpress/?mode=xml", "main");
URL: http://digitalzoomstudio.net