12-10-2007, 05:26 AM
|
#8 (permalink)
|
|
The Wanderer
Join Date: Nov 2007
Posts: 22
Thanks: 0
|
Quote:
Originally Posted by Haris
You can use a function called glob(). It uses a pattern to search for the required files. If all you have in that directory are images, you can use the following:
http://php.net/glob
php Code:
<?phpforeach (glob("*") as $szFilename) { echo '<img src="' . $szFilename . '" alt="Image" />'; }?>
Database would be overkill for a simple thing like this which can be achieved using one function unless you want to output more information regarding the file like titles, short description, tags and much more..
|
That ouputs a syntax error
|
|
|
|