echoing a link tag is echoing as text
Posted: Mon Mar 16, 2009 5:17 pm
This may be a bit simple but is beyond me...
There's a class involved in this but I'm leaving it out because I think it will make things more confusing. I'm attempting to do this:
I have used single and double-quotes in the link but they don't matter either way because they are modified by the class before they actually go to the variables.
This echos the contents of the variable as a string of text rather than producing the desired link and image.
But when I use this...
I end up with the desired image and link.
The data that populates the variables in the second example (that works) is cut-and-pasted from the same text that is used in the first example. The use of single vs. double-quotes has no effect.
Any advice will probably extend my lifespan and may save my marriage - thanks much
There's a class involved in this but I'm leaving it out because I think it will make things more confusing. I'm attempting to do this:
Code: Select all
[color=#FF0000]<?php[/color]
$imageNameA = "<a target='new' href='http://click.anagency.com/fs-bin/click?id=abcdef&offerid=12345.10000130&type=4&subid=0'><IMG alt='acompany' border='0' src='http://images.acompany.com/email/affiliate_new/Laptops_120x240.gif'></a>";
[color=#FF0000]?>[/color]Code: Select all
<div align="center">
[color=#FF0000]<?php[/color] echo $imageNameA;[color=#FF0000] ?>[/color]
</div>But when I use this...
Code: Select all
<div align="center">
<a href="[color=#FF0000]<?php[/color] echo $imageLinkA; [color=#FF0000]?>[/color]" target="_blank">
<img src="[color=#FF0000]<?php[/color] echo $imageNameA; [color=#FF0000]?>[/color]" height="[color=#FF0000]<?php[/color] echo $imageHighA; [color=#FF0000]?>[/color]" width="[color=#FF0000]<?php[/color] echo $imageWideA; [color=#FF0000]?>[/color]" alt="[color=#FF0000]<?php[/color] echo $imageAltA; [color=#FF0000]?>[/color]" class="topPadding" border="0" />
</a>
</div>The data that populates the variables in the second example (that works) is cut-and-pasted from the same text that is used in the first example. The use of single vs. double-quotes has no effect.
Any advice will probably extend my lifespan and may save my marriage - thanks much
