u may use the PHP function key() that returns the index element of the current array position.
On Nov 8, 5:26 pm, "Dave" <make.cake.b...@gmail.com> wrote: > Is there a simple way to get the model name from something like this? > > This is the data that's sent to cake. > > data[Contact][email] t...@something.com > data[Account][email] te...@fake.com > > Debug will get me > Array( > [Contact] => array( > [Email] => t...@something.com > ) > ) > > Where I simply need 'Contact' or 'Account' > > Thanks > > Dave --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---