Wie transponiere ich ein assoziatives Array indizierter Arrays? [Duplikat]Php

PHP-Programmierer chatten hier
Guest
 Wie transponiere ich ein assoziatives Array indizierter Arrays? [Duplikat]

Post by Guest »

Ich habe ein Array wie dieses in PHP:

Code: Select all

Array
(
[Color] => Array
(
[0] => Pink
[1] => Pink
[2] => Pink
[3] => Pink
)

[Size] => Array
(
[0] => S
[1] => S
[2] => S
[3] => M
)

[Brand] => Array
(
[0] => Raymond
[1] => Levis
[2] => Lee
[3] => Raymond
)

[price] => Array
(
[0] => 1500
[1] => 1500
[2] => 1500
[3] => 1600
)

[quantity] => Array
(
[0] => 2
[1] => 2
[2] => 2
[3] => 3
)
)
Ich möchte aus dem obigen Array ein neues Array wie folgt erstellen:

Code: Select all

    Array(
[0] => Array
(
[Color] => Pink
[Size] => S
[Brand] => Raymond
[price] => 1500
[quantity] => 2
)
[1] => Array
(
[Color] => Pink
[Size] => S
[Brand] => Levis
[price] => 1500
[quantity] => 2
)
),
// and so on.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post