我想結合單個數組中的多個數組輸出。下面是當我這樣做時我得到的數組。不同的數組轉換爲多維數組
print_r($getData_milestone);
我有數組如下:
[milestone] => Array
(
[0] => milestone 1
[1] => milestone 2
[2] => milestone 3
)
[date] => Array
(
[0] => 10/25/2015
[1] => 10/30/2015
[2] => 11/25/2015
)
[status] => Array
(
[0] => 1
[1] => 1
[2] => 0
)
我想輸出,如下圖所示:
Array
(
[0] => Array
(
[milestone] => milestone 1
[date] => 10/25/2015
[status] => 1
)
[1] => Array
(
[milestone] => milestone 2
[date] => 10/30/2015
[status] => 1
)
[2] => Array
(
[milestone] => milestone 3
[date] => 11/25/2015
[status] => 0
)
)
我已經通過這個代碼試圖
foreach($getData_milestone['milestone'] as $miledata)
{
$allDatamile[$i]=$getData_milestone;
$allDatamile[$i]=$getData_milestone['date'];
$allDatamile[$i]=$getData_milestone['status'];
$i++;
}
需要幫助或代碼的問題,沒有**任何研究努力**在編輯之前不得提高。 –