I do not know if anyone else would find this helpful, but I made a slight modification to this snippet. It allows for a default letter to be selected when one first views the page. For instance, if you wanted to call the atoz snippet with ’A’ displayed first when someone visits the page, you could just do so like this:
Similar to other variables for the snippet. I changed lines 56-57 from
//-- Gets the selected letter if a letter has been chosen
$letter = (isset ($_GET['letter'])) ? stripslashes($_GET['letter']) : '';
to
//-- Gets the selected letter if a letter has been chosen
if (isset ($_GET['letter'])) { $letter = stripslashes($_GET['letter']); }
elseif (isset ($letter)) { $letter = stripslashes($letter); }
else { $letter = ''; }
The snippet still works normally if no letter is set to default.