Assoziative Arrays - Feldname um Variable erweitern
Moin!
Wie kann ich bei einem Assoziativen Array den Feldnamen um einen Wert erweitern, der aus einer Variablen kommt?
Im Detail möchte ich das in etwa so machen:
$arArray = array("Wert $zahl" => $wert);
Das Feld Wert würde dann heißen sollen Wert1, Wert5, Wert33 usw.
Wie mache ich das?
Gruß
Christoph
Wie kann ich bei einem Assoziativen Array den Feldnamen um einen Wert erweitern, der aus einer Variablen kommt?
Im Detail möchte ich das in etwa so machen:
$arArray = array("Wert $zahl" => $wert);
Das Feld Wert würde dann heißen sollen Wert1, Wert5, Wert33 usw.
Wie mache ich das?
Gruß
Christoph
Please also mark the comments that contributed to the solution of the article
Content-Key: 100501
Url: https://administrator.de/contentid/100501
Printed on: April 25, 2024 at 11:04 o'clock
4 Comments
Latest comment