Jump to content

[SOLVED] show image title from image variable


RyanSF07

Recommended Posts

Hi Guys,

 

I have a script that grabs images at random from a "thumbnails" folder in my directory. They are displayed with:

 

code code..
echo "<img src='$dir/".$files[$rnd]."'>;

 

Do you know how I can see the name of the image?

 

I'd like to be able to see the image name as a $string variable -- but can't figure out how I can see the name of the image when the image itself is echoed.

 

Any ideas?

 

Thanks,

Ryan

 

so, for example, if a picture of a family member is pulled from the folder and ThisFamilyMember'sName.jpg is displayed in a table, is there a way to create ThisFamilyMemeber'sName as a $string variable -- something like --

 

"file name = $string" 

 

Any ideas on how I can do that?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.