I have to convert the first array into the second, in the form of array(id=> data). I am doing
Set::combine($array, '{n}.{n}.id', '{n}.{n}');
But its not working.Please tell me what is wrong in this or how it should be done.
Array1:
Array
(
[0] => Array
(
[0] => Array
(
[id] => 1
[user_id] => 1
[group_id] => 7
[comment] => Comment 1.
)
[1] => Array
(
[id] => 3
[user_id] => 4
[group_id] => 8
[comment] => Comment 4
)
)
Array2:
Array(
[1] => Array
(
[id] => 1
[user_id] => 1
[group_id] => 7
[comment] => Comment 1.
)
[3] => Array
(
[id] => 3
[user_id] => 4
[group_id] => 8
[comment] => Comment 4
)
)