Re: image inventoryer
| From: | Tedd Sperling | Date: | Sun, 08 Apr 2012 15:16:31 +0000 |
| Subject: | Re: image inventoryer | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317487@lists.php.net to get a copy of this message | ||
Kirk:
Okay, you took the first step. Now please review this:
<?php
foreach (glob("images/*.jpg") as $filename)
{
echo("<img src=\"$filename\"><br>$filename
<br><br>");
}
?>
Note:
1. This example does not put in all the embedded formatting shown in your example. What you did was
simply bad form -- you should learn css as well. Also, you don't need to place the code within
a bunch of html -- it will work "as-is".
2. I always want my students to place images in an image directory -- the above conforms to that.
3. The example also shows how to separate the jpg's from other files in the directory.
So, where do you want to go now?
Cheers,
tedd
_____________________
tedd.sperling@gmail.com
http://sperling.com