$link is db row which has the same url as the test does but the &'s are &amp;'s and the image wont show, i have tried using htmlspecialchars_decode and html_entity_decode on the $link which seems to replace the &amp; with a & so looking like the url is exactly the same as in the test code but it still refuses to work but im not sure why?