Reputation: 19
hello i keep getting an error message when i try to place a image file inbetween 2 anchor tags. i am using echo for the obvous reason i am using php but i get this message when i try to refresh the page:
*Parse error: syntax error, unexpected '<' in E:\Game Downloads\Applications\Xampp\htdocs\WEBSITE DESIGN(PHP)\signed_in.php on line 189*
below is what i have got so far but ive been messing around with the way the speech marks are used and the quotation marks
echo"<div class='add_to_cart'>";
echo"<a href='#'>""<img src='Images/ADD-TO-CART-copy-4.png' />" "</a>";
echo"</div>";
Upvotes: 1
Views: 717
Reputation: 3424
Try this:
echo "<div class='add_to_cart'><a href='#'><img src='Images/ADD-TO-CART-copy-4.png' /></a></div>";
Upvotes: 1
Reputation: 1
Try this:
print '<div class="add_to_cart">';
print '<a href="#"><img src="Images/ADD-TO-CART-copy-4.png" /></a>';
print '</div>;
or similarily:
print '<div class="add_to_cart"><a href="#"><img src="Images/ADD-TO-CART-copy-4.png" /></a></div>';
Upvotes: 0
Reputation: 44844
Make it simple as below -
echo '<a href="#"><img src="Images/ADD-TO-CART-copy-4.png" /></a>';
Upvotes: 1