Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

PHP and HTML, and how to access PHP variables from HTML

From: jim sullivan <jim-sullivan@comcast.net>
Date: Fri, 15 Jul 2005 15:19:11 -0400
Message-ID: <000601c58972$15329240$6401a8c0@surfside>
To: <www-html@w3.org>

This is a general question on how to reference script variables from HTML, 
although the example I use is with PHP.  Can someone point me to an example 
that shows how to do this ?  

I want to use the PHP file system functions to read the contents(image files) of a directory, 
and then reference the PHP variable from HTML to display the image. 
Here is an example that does NOT work but it should show what I am trying to do. 

<?php
foreach(glob("*.jpg") as $imagefile)
{ 
?> 
<img src=$imagefile title="$imagefile"> 
<?php
}
?>


thanks
Received on Saturday, 16 July 2005 11:20:53 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.