![]() |
$this->upload->data() problem/question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: $this->upload->data() problem/question (/showthread.php?tid=34195) |
$this->upload->data() problem/question - El Forum - 09-22-2010 [eluser]Paul Skinner[/eluser] I'm having a problem with the $this->upload->data() function. I want to grab the file_name, image_width, and image_height data in the view and loop through to show all the images that have been uploaded. At the moment it's uploading the images perfectly, I just can't get it to loop through and display the images in the 'image_success' view (the code is below). I've got a feeling I'm using the foreach incorrectly in the view. I've had a long day at work, and know I'm just being slow, so be patient with me :down: Thanks for your help in advance. Controller: Code: $config['upload_path'] = './site-images/'; View: Code: <?php if(isset($upload_data)){ ?> $this->upload->data() problem/question - El Forum - 09-22-2010 [eluser]vivi[/eluser] You don't need the foreach, just do : Code: <img src="<?php echo $upload_data['file_name'];?>" width="<?php echo $upload_data['image_width'];?>" height="<?php echo $upload_data['image_height'];?>" /> |