private function getNestedEntriesR(GWF_GuestbookMSG &$entry) { $pid = $entry->getVar('gbm_id'); $childs = $entry->selectObjects('*', "gbm_replyto={$pid}", 'gbm_date ASC'); $entry->setVar('childs', $childs); foreach ($childs as $child) { $this->getNestedEntriesR($child); } }