[eluser]Cosizzle[/eluser]
First off hello.
Ive been looking for a while now for a framework for my php; for a while it was Smarty. Then I came across this and am much more impressed.
In anycase I am going through the learning curve. Im wanting to display images within a folder so what ive done is:
1. within my constructor
Code:
$this->load->helper('file');
2. in a method
Code:
$data['imgDir'] = get_filenames('public/img/');
3. in a view
Code:
<?php
foreach($imgDir as $imgs)
{
echo $imgs;
}
?>
Im not sure if its my path or the way im trying to hold the array of data.
The Error being output is
Code:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: body/img_view.php
Line Number: 4