$value)
{
if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
{
$result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value);
}
else
{
if (substr($value, -3) == '.js')
{
if (!in_array($value, $fileIgnore))
{
$result[] = substr($value, 0, -3);
}
}
}
}
return $result;
}
function displaySection($title, $files) {
echo "$title
";
echo "";
foreach ($files as $key => $file)
{
if (is_array($file))
{
displaySection($key, $file);
}
else
{
echo "- $file
";
}
}
echo "
";
}
$path = realpath('../src');
$files = dirToArray($path);
displaySection("Phaser v2.1.1", $files);
// echo "";
// print_r($files);
// echo "
";
?>