The Comprehensive Online IT Community. Focusing on all aspects of IT from IT Jobs to Software Development.
| Jamie | |
|
Rank: Advisor Posts: 30 Joined: Thu Apr 12, 2012 12:02 am |
Hi everyone, I run a genealogy website that is mainly html, a few php pages, and a few java scripts i picked up for specific needs. I dont know php or java. though i would like to pick a few things up. I have a problem, a lengthy task manually, that i would like to automate. I have about 300 images in a directory: images/arms/ and each image file name begins with a number followed by an underscore: e.g. 45_coatsofarms.png I have a html file with text and in that text each image is mentioned with the number followed by a period: e.g. 45. What i need to achieve is an image link directly after this text pointing to the correct file. I know this can be done in php, but im not sure how to achieve it. Can someone offer some help? Thanks |
|
|
| Ron F | |
|
I'm no expert but you might be able to do this in javascript, perhaps somehow parse the text, and auto insert the links? Perhaps some of the Ninja wizards could lend a hand? |
|
|
|
| Mark73 | |
|
Jamie, do you have any more details? This is certainly do-able via PHP. When you say you want to switch some text into links, does each number example "45." link to only ONE image? |
|
|
|
| ljepilo | |
|
Rank: Apprentice Posts: 110 Joined: Mon May 21, 2012 7:51 am |
Hi, Try these steps... 1.Simple create a table like "images_upload", 2.In this table create a column name image 3. Put all the 300 images into this table. 4. Fetch all the value from the database put like that. 5. <a href="URL_<?=45_"File Name"?>" target="_blank">File Name</a> I hope this helps |
|
|
Users browsing this forum: No registered users and 1 guest