Jump to content

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" />';

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.