Hi, I have several rows in a database which has just text and images in. What i want to do is when printing out i want to find anything that looks like this: <img alt=Kitchen src=http://davidjohninteriors.co.uk/uploads/images/thumbs/83317967.JPG align=left> Code (markup): And replace it with: <a href=uploads/images/big/83317967.JPG ><img alt=Kitchen src=uploads/images/thumbs/83317967.JPG align=left></a> Code (markup): The only problem is that the alt is going to be different on each of them also the align and name of the image. How would i go about doing this? Cheers, Adam
i think you may need to do a loop and print the html tags combining with the values from db if the db is stored with image paths and name. Do make your requirements clear