Hello guys,
I'm having some problem with the Set::extract feature of cakephp:
Here is my array from $this->data that was already submitted:
[User] => Array
(
[User] => Array
(
[1] => Array
(
[0] => 3
)
[2] => Array
(
[0] => 2
)
[3] => Array
(
[0] => 4
)
)
)
and I want to have a result (array) like this:
[User] => Array
(
[User] => Array
(
[1] => 3
[2] => 2
[3] => 4
)
)
However, when i do this:
$this->data['User']['User'] = Set::extract($this->data['User']
['User'], '{n}.0');
The result is always like this:
[User] => Array
(
[User] => Array
(
[0] => 3
[1] => 2
[2] => 4
)
)
See the difference? Set:extract is always resetting (from zero and so
on) the ids of the root array I'm trying to extract.
I receive,
[0] => 3
[1] => 2
[2] => 4
instead of what I want which is:
[1] => 3
[2] => 2
[3] => 4
Please help. I really need the original ids for parsing purposes.
Thanks,
Mario
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---