Hi there,

I have the following index() method in my controller:

function index() {
                $travelogues = $this->Travelogue->find('all');
                $i = 0;
                foreach (  $travelogues as $travelogue):
                        if (!empty($travelogue['Travelogue']['gallery'])){
                                $travelogues[$i]['Images'] = "abcdef";
                                debug($travelogues);
                        }
                        $i++;
                endforeach;
                $this->set('travelogues', $this->paginate());
        }

The purpose is to append a key called 'Images' to $travelogues.
The debug($travelogues) shows that it worked.

But debugging $travelogues in my view index.ctp shows no 'Image'.
What did I do wrong here?

Thanks for any help.

Kind regards!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to