Tuesday, June 29, 2010

Re: find output array!

Try find('list', array(contain => array( 'Model1', 'Model2' )));

On Jun 29, 1:23 am, saidbakr <said....@gmail.com> wrote:
> Hi,
> From documentation, find may output array like the following:
>
> Array
> (
>     [0] => Array
>         (
>             [ModelName] => Array
>                 (
>                     [id] => 83
>                     [field1] => value1
>                     [field2] => value2
>                     [field3] => value3
>                 )
>
>             [AssociatedModelName] => Array
>                 (
>                     [id] => 1
>                     [field1] => value1
>                     [field2] => value2
>                     [field3] => value3
>                 )
>
>         )
> )
>
> What I need to know, does it possible to change the numerical array
> index Array([0]... - 0 - to be the integer value of the id in the
> ModelName array, i.e 83 ?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: