On Sun, Apr 17, 2011 at 3:37 PM, Điển vũ <[email protected]> wrote:
> $result = Set::combine($a, array('{0}: {1}', '{n}.User.Data.user',
> '{n}.User.Data.name'), '{n}.User.id');
> /* $result now looks like:
> Array
> (
> [mariano.iglesias: Mariano Iglesias] => 2
> [phpnut: Larry E. Masters] => 14
> [gwoo: The Gwoo] => 25
> )
> */
>
> With format: [gwoo: The Gwoo], i don't know when need to use it ?
> With Set::combine , i can extract data with this format ?:
>
> Array(
>   'username'=>array(
>         'id'=>1,
>         'password'=>'abc'
> }
>
> I think it can't extract as above .

It's not clear what you're asking. If you show an example of your data
array and the output you're trying to achieve maybe someone can help.

-- 
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

Reply via email to