If you paste the exact format of the data array you're trying to
process, I'm sure I can write the params for you to extrat it.

Do a debug() or print_r() on the data [or a subset... enough to get
the structure] and paste it here.

hth
grigri

On Jan 23, 12:42 pm, Jon Bennett <[email protected]> wrote:
> hi,
>
> I'm sure this is possible, it's just alluding me at present!
>
> I have 2 models:
>
> MixtureCategory
> Mixture
>
> MixtureCategory is a parent/child self association, so I'm getting the
> data like so:
>
> $this->data = $this->MixtureCategory->find('threaded');
>
> I'm looping over $this->data in my view, but only need to display info
> about the top level category, and would like to output list of links
> to all mixtures that belong to a second level category.
>
> foreach($this->data as $category):
>
>         // name
>         echo $category['MixtureCategory']['name'];
>
>         // mixtures
>         $mixtures = array_combine(
>                 Set::extract($category, 
> 'children.{n}.MixtureCategory.{s}.Mixture.name'),
>                 Set::extract($category, 
> 'children.{n}.MixtureCategory.{s}.Mixture.slug')
>         );
>
>         // test
>         debug($mixtures);
>
> endforeach;
>
> this gives me total garbage though.
>
> any ideas?
>
> cheers,
>
> Jon
>
> --
>
> jon bennett
> w:http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
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