Posted by Kim Andrι Akerψ on 10/10/06 17:15
laredotornado@zipmail.com wrote:
> Hi,
>
> Using PHP 4.4.4, do any of you have a quick way to generate a list of
> alphabetical links that link to <a name=""> sections on my page? The
> desired HTML would look like
>
> <a href="A">A</a>
> <a href="B">B</a>
> ...
> <a href="#Z">Z</a>
>
> Figured someone out there had a slick way to generate these.
Here's a way to do it:
foreach(range("A","Z") as $i)
echo "<a href=\"#".$i."\">".$i."</a> ";
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
[Back to original message]
|