Jump to content
xisto Community
Sign in to follow this  
iGuest

An archive a-z links bar with PHP

Recommended Posts

<div class="contentBlock" id="aZbar"><span class="title">Archive:</span> <a class="compact" href="/archive/letter.php?letter=9">#</a> <?phpfor ($i = a;; $i++) { //this says that our variable is a and each time through the loop, it becomes the next letter in the alphabet   ?>  <a class="singleLetter"    href="<!--insert archive link here -->.php?letter=<?php echo $i ?>"><?php echo $i ?></a><?php   if ($i == "z") { //when the value of $i is z, this ends the code.       break;   }} //end of Archive a-z bar code?></div>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.