Array
(
[User] => Array
(
user data
)
[PermissionGroup] => Array
(
[0] => Array
(
[id] => 5
[numero_horas] => 10
)
[1] => Array
(
[id] => 10
[numero_horas] => 7
)
[2] => Array
(
[id] => 15
[numero_horas] => 19
)
)
)
I need to put this data into this format array:
Array
(
[5] => Array
(
['disponible'] => 10
}
[10] => Array
(
['disponible'] => 7
}
[15] => Array
(
['disponible'] => 19
}
)
How can I do it?
I think I could use Set::combine function. I have tried this way:
$newArray = Set::combine($arrayData, 'PermissionGroup.{n}.id',
'PermissionGroup.{n}.numero_horas');
But this creates this array:
Array
(
[5] => 10
[10] => 7
[15] => 19
)
Thanks for your help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---