calvin182 Posted April 9, 2006 Share Posted April 9, 2006 I have an array called $db, the keys are filled with date/times and the values are filled with an image name (in this case: header_720x95_01.png). I have the path of the images set as $images.My problem is when I use foreach(), it is adding an additional path of http://www.domain.com/folder/gallery/admin/ infront of the $images.$value2 causing my image source to look like http://www.domain.com/folder/gallery/admin/www.domain.com/folder/gallery/images/main/header_720x95_01.png . I am thoroughly frustrated with this, can anybody help? Here is the code: foreach ($db as $key2 => $value2) { echo "<img src=\"".$images.$value2."\"/><br/>image: $value2<br/>uploaded: $key2<br/><a href=\"remove.php?key=$key2&value=$value2\" title=\"remove this image\">remove this image</a><br/><br/>";} Any help would greatly be appreciated! Thank you Ps. sorry about the urls in the code boxes, the long one was getting truncated. Link to comment Share on other sites More sharing options...
calvin182 Posted April 10, 2006 Author Share Posted April 10, 2006 okay we'll I solved getting the path correct, i'm not sure how i managed it though, but problem solved. Link to comment Share on other sites More sharing options...
Little Goat Posted April 10, 2006 Share Posted April 10, 2006 Um, why do you have a title on you A tag? i've never seen that before...LG Link to comment Share on other sites More sharing options...
calvin182 Posted April 10, 2006 Author Share Posted April 10, 2006 i have a title tag in my a tag because it will pop up a little tool-tip type thing about the text on mouseover. I also do this with images, because useing just the alt tag does not popup text in firefox, but it does in ie, so i use both. Or, if i dont want my image to show the tooltip in ie, i add a blank title tag so nothing pops up. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now