phpbar.de logo

Mailinglisten-Archive

[php] Array & Key

[php] Array & Key

Andreas Ahlenstorf lists at ahlenstorf.ch
Son Feb 20 21:31:20 CET 2005


rfinster at rf-concepts.de schrieb:

> foreach ($test as $value) {
>     if (key($test) != 'id') {	
>         echo $value . " \n";
>     }
> }

foreach ($test as $_key => $_value) {
    if ($_key != 'id') {
        // do something
    }
}

Gruss,
Andreas

php::bar PHP Wiki   -   Listenarchive