I believe Cake's Set class is used for manipulating arrays in fairly complex ways, and might be useful in this situation-
http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/ However, make sure you really *need* the data in this format, rather than are just doing it out of force of habit - you get a lot more out of Cake if you go with its conventions rather than against them! On Apr 11, 11:38 am, trav <[EMAIL PROTECTED]> wrote: > hi bakers! > > Im not sure if this is a cake question or more just a general php > question. > > When i create a database view that includes some calculations and i > perform a findAll against that view cake give the following output: > > Array > ( > [0] => Array > ( > [Users] => Array > ( > [id] => 1 > [name] => 'jane' > ) > > [0] => Array > ( > [total_cost] => 400 > ) > [group] => Array > ( > [descr] => 'public' > ) > ) > > I really need the following output: > > Array ( > [id] => 1 > [name] => 'jane' > [total_cost] => 400 > [descr] => 'public' > ) > > Can cake help me out here or am i left to code a solution in php? > > Cheers, > Trav. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
