Mailinglisten-Archive |
> -----Ursprüngliche Nachricht-----
> Von: Franz Graf [mailto:fg_(at)_FutureByte.net]
> Gesendet am: Thursday, April 06, 2000 4:06 PM
>
> Smarschevski Juri schrieb:
> > $arrTest = array();
> > $arrTest[0] = 'AAA';
>
> $arrTest is eine eindimensionale Array, in Feld 0 schreibst du
> AAA, ok.
>
> > $arrTest[0]['BLA'] = 'BBB';
>
> Hier sprichst [0] als assoziative Array mit Element[BLA] an. -
> Da steht aber derzeit nur 'AAA' drin. ausserdem ist [0] blos ne
> eindimensionale Array...
Da hast Du, wie die Praxis zeigt, recht. Im Manual (Theorie)
kann man folgendes finden:
http://uk.php.net/manual/language.types.array.php3
Multi-dimensional arrays are actually pretty simple. For each
dimension of the array, you add another [key] value to the end:
$a[1] = $f; # one dimensional examples
$a["foo"] = $f;
$a[1][0] = $f; # two dimensional
$a["foo"][2] = $f; # (you can mix numeric and associative indices)
$a[3]["bar"] = $f; # (you can mix numeric and associative indices)
$a["foo"][4]["bar"][0] = $f; # four dimensional!
Tja, so pretty simple sind die doch net. Danke Dir fuer die Hilfe.
Gruss
Juri
php::bar PHP Wiki - Listenarchive