Depends on what you're counting with.<br><br>I needed to loop over [A-Z] to make some anchors and stumbled across something interesting.<br><br>for ($i="A"; $i < Z; $i++):<br> echo($i);<br>endfor;<br><br>
Gives ABCD{..}XY<br clear="all"><br>for ($i="A"; $i <= Z; $i++):<br>
echo($i);<br>
endfor;<br><br>Gives ABCD{..}XYZAABB{..}<br><br>So I'm using<br>for ($i="A"; ($i <= Z and $i != "AA"); $i++):<br>
echo($i);<br>
endfor;<br><br>This produces the desired results.<br><br>From what I understand the default php behavior matched perl in that Z++ = "AA" not "]" as it would in C (so I 've read)<br><br>Is there a better way to do this?
<br> <br>-- <br>In vino veritas.<br> [In wine there is truth.]<br> -- Pliny