I'm using php to list all files in a folder recursively:
<?php
$it = new RecursiveDirectoryIterator(".");
foreach(new RecursiveIteratorIterator($it) as $file)
{
echo $file . "<br/>
";
}
But I would like this script to only list *.json files instead of all the files. How can I achieve this?
Many thanks for your help.