Here's how I'd do it. It's called a control-break, and what it does is evaluate the first letter of the link and compare
it to the first letter of the link before it. If the letter has changed, then crank out the HTML coding for the new letter's heading. If it's the same, then spit out just the link.
Here's the code:
// Creates a link for each file.
//Initialize the hold variable
$previousLetter = "";
foreach($dirFiles as $file)
//compare the first letter of the current $file to the previous $file
//Note I'm also going to want to catch the very first iteration and echo a heading for that letter group
if (substr($file, 0, 1) != $previousLetter || $previousLetter == "")
//echo out whatever HTML you want to display at the beginning of each letter group; this is just an example. You'll want to include an in-page anchor tag for your shortcut links you're going to put at the top of the page
echo "<h1>Recipes that start with the letter ".substr($file, 0, 1)."</h1>";
echo "<li><a href=\"http://www.brianosler.com/recipes/directory/HTML/chris_oslers_recipes/$file\">" . RemoveExtension($file) . "</a></li>";
//Don't forget to assign the new letter to $previousLetter for the next iteration's comparison
$previousLetter = substr($file, 0, 1);