<?php
$letters = range(A,Z);
$format_string = '<li><a href="#%s">%s</a></li>';
foreach ($letters as $key => $letter) {
echo printf($format_string,$letter, $letter);
}
?>
This is meant to print out an li with the alphabet from A-W, however the output looks like this:
-
A
27
-
B
27
etc.. all the way up to the last number.
Using a regular echo with string concatenation outputs the list fine without any 27's.