$value) { $cap[$key] = ucfirst($cap[$key]); } $word = implode(' ', $cap); return $word; } // Formats the file. This is the main function that calls all functions explained above. function formatFile($name) { // $name = strip_ext($name); // $name = removeHyphen($name); // $name = capFirstWord($name); return $name; } function buildLinks($directory) { $dir = $directory; $max = 10; $cwd = getcwd(); $files = scandir($dir, 1); $filecount = 0; echo "