Created
June 17, 2022 12:15
-
-
Save woodwardtw/352c6f930abc8b30b47a321f2c0d16f4 to your computer and use it in GitHub Desktop.
index builder for sensus access data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>SensusAccess Stats Index</h1> | |
<?php | |
function create_file_name($string){ | |
$name = str_replace('middlebury-report-','', $string); | |
$name = substr($name,0,10); | |
return $name; | |
} | |
$files = scandir('.'); | |
//var_dump($files); | |
foreach ($files as $key => $file) { | |
$clean_name = create_file_name($file); | |
if(strlen($clean_name)>3 && $clean_name != '.htaccess' && $clean_name != 'data.php'){ | |
echo "<a href='{$file}''>{$clean_name}</a></br>"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment