PhpRiot
Follow phpriot on Twitter
Sponsored Link

Listing 2739

Submitted by psj, 17 March 2010
<?php
$fileDir = $_SERVER['DOCUMENT_ROOT'] . '/xml/';
$handle = opendir($fileDir);
while (($file = readdir($handle)) !== FALSE) {
    if (is_dir($fileDir . $file)) continue;  
    if (!eregi("^movie.*\.xml$", $file)) continue;
 
    $movie = simplexml_load_file($fileDir . $file);    
 
        echo htmlentities($movie->titel);
}
?>
Submit a Follow Up