有沒有一個好的功能可以按鍵組合? (在這個例子是PID)數組在數組中通過數組鍵?
array
0 =>
array
'product' => string 'a product pid 3' (length=9)
'name' => string 'adamramadhan' (length=12)
'pid' => string '3' (length=1)
'timecreate' => string '2011-02-26 13:30:07' (length=19)
1 =>
array
'product' => string 'a product pid 4' (length=8)
'name' => string 'adamramadhan' (length=12)
'pid' => string '4' (length=1)
'timecreate' => string '2011-02-26 13:30:54' (length=19)
和
array
0 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=8)
1 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=8)
2 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=5)
3 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=5)
4 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=7)
5 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=7)
6 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=18)
7 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=18)
爲類似
array
0 =>
array
'product' => string 'a product pid 3' (length=9)
'name' => string 'adamramadhan' (length=12)
'pid' => string '3' (length=1)
'timecreate' => string '2011-02-26 13:30:07' (length=19)
'comments' => array
0 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=8)
2 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=5)
4 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=7)
6 =>
array
'pid' => string '3' (length=1)
'comment' => string 'a comment on pid 3' (length=18)
1 =>
array
'product' => string 'a product pid 4' (length=8)
'name' => string 'adamramadhan' (length=12)
'pid' => string '4' (length=1)
'timecreate' => string '2011-02-26 13:30:54' (length=19)
'comments' => array
1 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=8)
3 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=5)
5 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=7)
7 =>
array
'pid' => string '4' (length=1)
'comment' => string 'a comment on pid 4' (length=18)
或與每個產品的評論陣列上沒有PID(嵌套上的產品陣列)?
感謝拜訪。
亞當·拉馬丹
你不關心整數第一關鍵? – powtac 2011-03-03 11:07:04
對不起,我沒有得到哪一個是int第一個鍵,產品數組上的第一個鍵? – 2011-03-03 11:11:06
不管,第一個數組中的0-1和第二個數組中的0-7。但無論如何檢查我的解決方案:) – powtac 2011-03-03 11:13:04