1. $result = Set::combine($a, array('{0}: {1}', '{n}.User.Data.user',
'{n}.User.Data.name'), '{n}.User.id');
2.
3. /* $result now looks like:
4. Array
5. (
6. [mariano.iglesias: Mariano Iglesias] => 2
7. [phpnut: Larry E. Masters] => 14
8. [gwoo: The Gwoo] => 25
9. )
10. */
With format: [gwoo: The Gwoo], i don't know when need to use it ?
With Set::combine , i can extract data with this format ?:
1. Array(
2. 'username'=>array(
3. 'id'=>1,
4. 'password'=>'abc'
5. }
I think it can't extract as above .
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php