Hi grigri, > Oh, forgot one little thing. This code: > > `if (isset($document_categories) && count($document_categories) > 0)` > > can be replaced with this code: > > `if (!empty($document_categories))`
I find if I just check on if (empty( I get undefined errors if the array doesn't exist, do you not have this problem? Ahh, but I think I usually do if (empty()) rather than if (!empty()) - perhaps that's the key. 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 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 -~----------~----~----~----~------~----~------~--~---