gwh Posted February 28, 2010 Share Posted February 28, 2010 Hi everyone, I have the following line of code: echo "<p><img src=\"../../../../images/catalogue/{$itemSwatchBoth} . '.jpg'\" border=\"0\" alt=\"\" /></p>"; But when it outputs to the browser I get: <p><img src="../../../../images/catalogue/170_270 . '.jpg'" border="0" alt="" /></p> So the .jpg part isn't rendering. Can anyone see what I've done wrong? Appreciate any help. Link to comment https://forums.phpfreaks.com/topic/193642-possible-escaping-issue/ Share on other sites More sharing options...
inversesoft123 Posted February 28, 2010 Share Posted February 28, 2010 $itemSwatchBoth = "ilovePHP"; $lolfun="$itemSwatchBoth.jpg"; echo "<p><img src=\"../../../../images/catalogue/{$lolfun}\" border=\"0\" alt=\"\" /></p>"; Link to comment https://forums.phpfreaks.com/topic/193642-possible-escaping-issue/#findComment-1019315 Share on other sites More sharing options...
gwh Posted February 28, 2010 Author Share Posted February 28, 2010 Perfect! Thanks so much. Link to comment https://forums.phpfreaks.com/topic/193642-possible-escaping-issue/#findComment-1019320 Share on other sites More sharing options...
Altec Posted February 28, 2010 Share Posted February 28, 2010 Don't forget to mark the thread as solved. Link to comment https://forums.phpfreaks.com/topic/193642-possible-escaping-issue/#findComment-1019321 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.