title: I want to view all images inside a directory I'm using codeigniter directory helper
body: <p>I used codeigniter default helper function to map the directory</p>
  
  <pre><code>$path = 'user_uploads';
      $data = directory_map($path);
  </code></pre>
  
  <p>and i do a  </p>
  
  <pre><code>var_dump($data);
  </code></pre>
  
  <p>and the result is</p>
  
  <pre><code>array(9) { [0]=&gt; string(12) "SDC10027.JPG" [1]=&gt; string(12) "SDC10028.JPG" [2]=&gt; string(12) "SDC10029.JPG" [3]=&gt; string(12) "SDC10030.JPG" [4]=&gt; string(12) "SDC10031.JPG" [5]=&gt; string(12) "SDC10032.JPG" [6]=&gt; string(12) "SDC10033.JPG" [7]=&gt; string(12) "SDC10034.JPG" [8]=&gt; string(12) "SDC10035.JPG" }
  </code></pre>
  
  <p>what i need is i want to show each and every image in a web page like this.</p>
  
  <pre><code>&lt;img src="&lt;?php echo base_url() . 'user_uploads/'. $image; ?&gt;"/&gt;
  </code></pre>
  
  <p>$image is the image names that are read through the directory_map() function.</p>
  
  <p>the only thing i need to know is how to take those directory_map() return array image names to $image variable.</p>