Export $value) { $path = realpath($dir . DIRECTORY_SEPARATOR . $value); if (is_dir($path)) { $result[$value] = dirToArray($path); } else { if (substr($value, -3) == '.js') { if (!in_array($value, $fileIgnore)) { $index = str_replace($src, "", $path); $index = substr($index, 1); $result[substr($value, 0, -3)] = $index; } } } } return $result; } function displaySection($title, $files) { if ($title === "") { echo "

Phaser v2.1.1

"; } else { echo "

$title

"; } echo ""; } $src = realpath('../src'); $files = dirToArray($src); displaySection("", $files); // echo "
";
    // var_dump($src);
    // print_r($files);
    // echo "
"; ?>