Hey, wonder if anyone can help me...
I have a MySQL database which contains a list of filenames of images and captions that go with them. Using PHP I want to insert the captions as titles in the link of the correct image.
For example, in the db I may have test1.jpg with "This is a test". How can I get it to enter the title in the link using the filename as the reference? I mean I know how to enter the data itself into the page, but I don't know how to make it look at the filename of the link and enter the correct caption from the db.
eg <img src="test1.jpg" title="This is a test" />
Hope you understand what I mean!
Cheers.
I have a MySQL database which contains a list of filenames of images and captions that go with them. Using PHP I want to insert the captions as titles in the link of the correct image.
For example, in the db I may have test1.jpg with "This is a test". How can I get it to enter the title in the link using the filename as the reference? I mean I know how to enter the data itself into the page, but I don't know how to make it look at the filename of the link and enter the correct caption from the db.
eg <img src="test1.jpg" title="This is a test" />
Hope you understand what I mean!
Cheers.