Hi everyone,

I got a simple question on the combine function. I want to simplify an
array like for example a groups array:

Array
(
    [0] => Array
        (
            [UserGroup] => Array
                (
                    [id] => 1
                    [parent_id] =>
                    [lft] => 1
                    [rgt] => 2
                    [name] => admin
                )

        )

    [1] => Array
        (
            [UserGroup] => Array
                (
                    [id] => 2
                    [parent_id] =>
                    [lft] => 3
                    [rgt] => 8
                    [name] => User
                )

        )
)

to work with ACL, and need something like this:

Array
(
    [0] => Array
        (
            [alias] => admin
        )

    [1] => Array
        (
            [alias] => User
        )
)

When trying to use Set::combine for this I have two problems:
+ I cannot pass a static key ('alias')
+ for the group key (3rd parameter) I cannot pass only '{n}'

Any advices? Maybe another function that I overlooked so far?

Thanks,
harpax


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to