Re: image inventoryer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
http://sperling.com






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux