我有下面2數組:刀片2數組值新的數組與新的密鑰
Array 1
(
[0] => Daughter
[1] => Daughter
[2] => Son
)
Array 2
(
[0] => Nitu
[1] => ritu
[2] => ramesh
)
,我想用於每個鍵的不同陣列如下:
Array(
"relation" => Daughter
"name" => Nitu
)
Array(
"relation" => Daughter
"name" => ritu
)
Array(
"relation" => Son
"name" => ramesh
)
上述陣列1個&陣列2可以根據用戶輸入而長。所以我想動態地在循環中向新數組插入值。
聽見'for'環 – Ghost