phpbar.de logo

Mailinglisten-Archive

[php] A-Z in for-Schleife

[php] A-Z in for-Schleife

Boris Penck php_(at)_phpcenter.de
Mon, 16 Apr 2001 22:27:59 +0200


> <?php
> 
> $alpha = array("A","B","C",...,"Z");
> 
> for($i=0;$i <= count($alpha)-1;$i++) {
> echo $alpha[$i]
> }

Oder auch noch einfacher:

$alpha = array("A","B","C",..."Z");

foreach($alpha as $char) {
    print $char;
}



php::bar PHP Wiki   -   Listenarchive