Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
Alphabet Menu for directory listingsCode Wizard, 12-30-2006 |
A simple array which generates the code for an alphabet menu i.e. A-Z.
The code also creates the URL's automatically in the form of 'A.php3' etc
<?php
// Created by BrettShaw@searchenginetips.co.uk
//create the array
$alpha = array('#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
//format the text output in HTML
echo('<BR><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>');
//Loop through the array
for ($i = 0; $i <= 26; $i++)
{
//if # for misc appears label the link as 123.php3
if ($alpha[$i] == '#')
{
echo('<a href="123.php3">'.$alpha[$i].'</A> ');
}else{
//otherwise call the link the relevant letter
echo('<a href="'.$alpha[$i].'.php3">'.$alpha[$i].'</A> ');
}
}
echo('</B></font><BR><BR>');
?>
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

