<?php echo "Play list of JPG models files:</br>"; $dir = 'nikitazarubin'; $f = scandir($dir); foreach ($f as $file){ if(preg_match('/\.(jpg)/', $file)){
echo "<a href='mphp.php?name=$file'>$file</a></br>";
} } ?>