What are common methods for listing and linking HTML files in a specific folder using PHP?

When working with HTML files in a specific folder, a common method to list and link these files using PHP is to scan the directory for HTML files and create links to them dynamically. This can be achieved by using functions like `scandir()` to get a list of files in the folder and then iterating over the list to generate HTML links.

<?php
// Specify the directory path
$directory = "path/to/your/html/files/folder/";

// Get a list of files in the directory
$files = scandir($directory);

// Iterate over the files and create links to HTML files
foreach($files as $file){
    if(pathinfo($file, PATHINFO_EXTENSION) == 'html'){
        echo '<a href="' . $directory . $file . '">' . $file . '</a><br>';
    }
}
?>