[eluser]Unknown[/eluser]
Can someone help me with the following?
In my controller I have;
Code:
$this->load->model('Flickr');
$data['photos'] = $this->Flickr->get_published_photos();
$this->load->view('tearsheets', $data);
And in my model I have;
Code:
$photos = array();
foreach ($photoset['photoset']['photo'] as $photo) {
// Store data for use in the view
$photos = array ('title' => $photo['title'],
'photo_medium' => $f->buildPhotoURL($photo, 'medium')
'photo_square' => $f->buildPhotoURL($photo, 'square'));
}
return $photos;
The problem I have having is that when I look at $data['photos'] in the controller, then I only get the last record.
What do I need to change in the model so that all of the data is stored in $photos?
Thanks