嗨我确实收到了这种格式的数组:
array (size=2)
0 =>
array (size=1)
22 => string 'One string' (length=20)
1 =>
array (size=1)
8 => string 'Another string' (length=17)
我如何使用cakephp hash创建另一个数组8和22作为索引:
array (size=2)
22 => string 'One string' (length=20)
8 => string 'Another string' (length=17)
我尝试hash::nest
但结果是:
array (size=2)
0 =>
array (size=3)
0 => string 'One string' (length=17)
'children' =>
array (size=0)
empty
1 => string 'Another string' (length=20)
1 =>
array (size=3)
0 => string 'One string' (length=17)
'children' =>
array (size=0)
empty
1 => string 'Another string' (length=20)