I have 500 names on a database and I created a static A-Z html listing that anchors dynamically to a variable link in my query
[code=php]
$anchorlink = strtolower(substr($lastname, 0, 1));
if ($tempanchor != $anchorlink) {
print(“<h3><a name=”$anchorlink”></a>”.strtoupper($anchorlink).”</h3>n”);
}
I noticed that there is no last names that end with a ‘U’ so I have to make my A to Z list dynamically to check if a record with that list exists and make the link active or not-active depending on the availability of the record. Does anyone know on how to go about this? I know I have to check with a query to see if the record exists from a table and then i dont know.put it in a for loop? any suggestions are welcomed! thanks!