0
我有由PHP生成一個JavaScript陣列,使這個:將javascript數組鍵合併到內部數組中?
var sections = [
section1 =>
[name => anthony, email => [email protected]],
section1 =>
[name => anthony, email => [email protected]],
section1 =>
[name => anthony, email => [email protected]],
section2 =>
[name => anthony, email => [email protected]],
section2 =>
[name => anthony, email => [email protected]]
]
什麼使它的最好辦法:
var sections = [
section1 =>
[name => anthony, email => [email protected]],
[name => anthony, email => [email protected]],
[name => anthony, email => [email protected]],
section2 =>
[name => anthony, email => [email protected]],
[name => anthony, email => [email protected]]
]
合併所有像鑰匙,並把所有的內部數組到同一個池。
因此,我可以循環每個部分作爲「部分」,而不是同一部分的部分。
這不是JavaScript。 – Leo 2015-04-04 00:27:11
這不是真正的代碼,它是一個例子。 – Anthony 2015-04-04 00:28:23
好問題的步驟:1.發佈實際的JavaScript代碼。向我們展示你到目前爲止所嘗試的。 3.在演示中重現特定問題。 – elclanrs 2015-04-04 00:30:02