$data = array ('Fuelprice' => Set::combine($data, 'Fuelprice.{n}.id', 'Fuelprice.{n}'));
On Jun 21, 12:18 am, Petr Vytlačil <petr.vytla...@gmail.com> wrote: > Hi, does anybody idea how reindexing results? > > Now output from CakePHP: > ---------------------------------------------------- > > [Fuelprice] => Array > ( > [0] => Array > ( > [id] => 1 > [yearsetting_id] => 2 > [fueltype_id] => 1 > [price] => 26.3 > ) > > [1] => Array > ( > [id] => 2 > [yearsetting_id] => 2 > [fueltype_id] => 2 > [price] => 26.3 > ) > > [2] => Array > ( > [id] => 3 > [yearsetting_id] => 2 > [fueltype_id] => 4 > [price] => 26.8 > ) > > ) > > I wish: > ------------------------------------- > [Fuelprice] => Array > ( > [id_item] => Array > ( > [id] => 1 > [yearsetting_id] => 2 > [fueltype_id] => 1 > [price] => 26.3 > ) > > ---------------------------------------- > Example: > ----------------------------------------- > [Fuelprice] => Array > ( > [1] => Array > ( > [id] => 1 > [yearsetting_id] => 2 > [fueltype_id] => 1 > [price] => 26.3 > ) > > [2] => Array > ( > [id] => 2 > [yearsetting_id] => 2 > [fueltype_id] => 2 > [price] => 26.3 > ) > > [3] => Array > ( > [id] => 3 > [yearsetting_id] => 2 > [fueltype_id] => 4 > [price] => 26.8 > ) > > ) > > THX. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---