我的PHP函數輸出分離的數組而不是編號的索引數組。現在的問題是,我如何使這些輸出連接到一個數組中?如果你有任何澄清讓我知道。如何重新排列數組?
這是目前正在輸出的內容。
Array
(
[id] => 2
[name] => Jerry Maxwell
[upline] => 1
)
Array
(
[id] => 3
[name] => Roseann Solano
[upline] => 1
)
Array
(
[id] => 4
[name] => Joshua Doe
[upline] => 1
)
Array
(
[id] => 5
[name] => Ford Maxwell
[upline] => 1
)
Array
(
[id] => 6
[name] => Ryan Solano
[upline] => 1
)
爲了這樣的事情:
Array
(
[0] =>
[id] => 2
[name] => Jerry Maxwell
[upline] => 1
[1] =>
[id] => 3
[name] => Roseann Solano
[upline] => 1
[2] =>
[id] => 4
[name] => Joshua Doe
[upline] => 1
[3] =>
[id] => 5
[name] => Ford Maxwell
[upline] => 1
[4] =>
[id] => 6
[name] => Ryan Solano
[upline] => 1
)
我通過PHP期待這一點。
輸出*由什麼*?除了一個例子,要求對你的目標的描述太多了嗎? – Jon 2012-04-10 13:13:52
看來你只是給了我們'var_dump'的輸出。給我們代碼。 – devsnd 2012-04-10 13:14:44
在你的其他問題,它已經是一個嵌套數組http://stackoverflow.com/questions/10067731/how-retrieve-specific-duplicate-array-values-with-php – 2012-04-10 13:47:14