CodeIgniter Forums
foreach image from directory - 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: foreach image from directory (/showthread.php?tid=52435)



foreach image from directory - El Forum - 06-11-2012

[eluser]Gabi3xz[/eluser]
how to display all images from a directoy with foreach?


foreach image from directory - El Forum - 06-14-2012

[eluser]meer[/eluser]
first get their names from db, and then in view supply path with the corresponding image names
all images will be displayed with foreach


foreach image from directory - El Forum - 06-14-2012

[eluser]CI_expert_indian[/eluser]
Hi

If you are not storing the name in DB and still u want to get all the names from directory then use glob function in PHP . If this is requirement then i can provide more help about this.