Jump to content

[SOLVED] Can't get eccho to display an image


gozbay.com

Recommended Posts

Hello, I am not an expert on php but know some of the basics. My problem is that when I try to make the echo display an image it results in a syntax error. Below is the original code that displays text if $setts['swap_items']==1.

<? 
					if ($setts['swap_items']==1&&$auctionDetails['ownerid']!=$_SESSION['memberid']&&$auctionDetails['closed']!=1&&$auctionDetails['isswap']=="Y"&&$auctionDetails['deleted']!=1) {
						echo "<a href=\"swapitems.php?id=".$auctionDetails['id']."\">".$lang[offerswap]."</a>";
					} ?>

Would anyone be willing to show me how I would go about displaying a picture instead of the text? Any help would be greatly appreciated!

-Zach

I recieve this error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/gozbay/public_html/auctiondetails.php on line 688 when the echo looks like this

echo "<a href=\"swapitems.php?id=".$auctionDetails['id']'<img src="images/SWAP.gif" alt="Offer a Swap Deal" />';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.