Welcome Guest, Not a member yet? Register   Sign In
Array of Array ?
#1

[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


Messages In This Thread
Array of Array ? - by El Forum - 03-25-2012, 09:05 AM
Array of Array ? - by El Forum - 03-25-2012, 09:34 AM
Array of Array ? - by El Forum - 03-25-2012, 09:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB