are you trying to find records only from a specific letter?
well, let's say G, which would also be $letters[6] (arrays start at 0, not 1)
print ' <a href="list.php?letter=' . $letters[6] . '">' . $letters[6] . '</a> -';
if you're trying to stop the letter you're showing records from viewing as a link, you would use an 'if' statement pertaining to a variable that determines what arecords are being shown.
I'll use $show_letter for this example
If we're showing records for letter 'C', than:
$show_letter = "C';
so in our loop:
for ($i = $after; $i < count($letters); $i++)
{
if ($letters[$i] == $show_letter)
{
// we are on this page - do not display as a link
print $letters[$i] . " -";
}
else
{
// display as a link
print ' <a href="list.php?letter=' . $letters[$i] . '">' . $letters[$i] . '</a> -';
}
}
Now, if you're looking to add a 'Next' link for the next latter in the series from your current starting point, meaning if we're on page 'G', 'Next' should link to results from 'H'
we could use a similar concept from above, where we reference the array element number from the page we're on.
So, '2' would be the element number for 'C' ($letters[2] == "C")
we'll call this variable $on_element
echo "You are vieving results form the letter $letters[$on_element].<br>\n";
$next_element = $on_element + 1;
echo "<a href='list.php?letter=$next_element'>' . $letters[$next_element] . '</a> -";
Let me know if none of the above help you solve your problem
also, if they don't please try to give some more insight to your issue.
Thanks,
-=Lazz=-