0
分隔鍵值算這是我的數組如何讓嵌套數組在PHP
Array
(
[2] => Array
(
[0] => Array
(
[id] => 2
[res_id] => 1
[grand_total] => 303.42
[time] => 2016-07-28 11:04:38 AM
[status] => 0
)
[1] => Array
(
[id] => 2
[res_id] => 1
[grand_total] => 303.42
[time] => 2016-07-28 11:04:38 AM
[status] => 0
)
)
[1] => Array
(
[0] => Array
(
[id] => 1
[res_id] => 1
[grand_total] => 303.42
[time] => 2016-07-28 11:04:17 AM
[status] => 0
)
)
)
從這個我需要子陣列數即具有兩個指標如2 & 1
陣列從這個2 & 1
有一些嵌套數組發現如0 & 1
每個
在這裏,我需要數組數如下
Array
(
[2] => Array
(
[count] = 2
)
[1] => Array
(
[count] = 1
)
)
我應該如何獲得這個..
有人幫我出這...
謝謝。
向我們展示您爲實現這一目標所嘗試的內容。 – Epodax
對於數組的基本用法,您可以查看此鏈接http://www.technofusions.com/introduction-to-arrays-in-php/ –