Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick Question
#2
hi there this is script gets the content in a folder and if you echo output it displays the images inside a div

Code:
// open the directory
  $dir = opendir( $pathToImages );

  $counter = 0;
  // loop through the directory
  while (false !== ($fname = readdir($dir)))
  {
    // strip the . and .. entries out
    if ($fname != '.' && $fname != '..')
    {
      $output .= "<div id=\"id\">";
      $output .= "<img src=\"{$pathToImages}{$fname}\" border=\"0\" />";
      $output .= "</div>";

    }
  }
Reply


Messages In This Thread
Quick Question - by JWH_Matthew - 2010-05-18, 10:49:57
Quick Question - by rogerstreets - 2010-05-18, 20:16:52
Quick Question - by sertorre - 2010-06-19, 18:09:58



Users browsing this thread: 1 Guest(s)