Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-12-2012, 09:57 AM   PM User | #1
Feckie
Regular Coder

 
Join Date: Jan 2009
Posts: 196
Thanks: 29
Thanked 0 Times in 0 Posts
Feckie has a little shameless behaviour in the past
Fresh Eyes Please

Can anyone tell me why this is not working

<a href=\"' . $link . '\" target=\"_blank\"><img src=\"./images/' . $categorie . '.png\" width=\"40\" height=\"40\" border=\"1\" title=\"' . $categorie . '\"></a>

Last edited by Feckie; 07-12-2012 at 07:09 PM..
Feckie is offline   Reply With Quote
Old 07-12-2012, 11:56 AM   PM User | #2
Arcticwarrio
Regular Coder

 
Arcticwarrio's Avatar
 
Join Date: May 2012
Location: UK
Posts: 575
Thanks: 15
Thanked 64 Times in 64 Posts
Arcticwarrio is on a distinguished road
is it inside <?PHP tags or <HTML> tags?

PHP Code:
<?php
echo '<a href="' $link '" target="_blank"><img src="./images/' $categorie '.png" width="40" height="40" border="1" title="' $categorie '"></a> ';
?>

<html>
<BODY>
<a href="<?php echo $link;?>" target="_blank"><img src="./images/<?php echo $categorie?>.png" width="40" height="40" border="1" title="<?php echo $categorie?>"></a>
</BODY>
</html>
Arcticwarrio is offline   Reply With Quote
Old 07-12-2012, 01:10 PM   PM User | #3
phpdude
New Coder

 
Join Date: May 2012
Posts: 17
Thanks: 0
Thanked 3 Times in 3 Posts
phpdude is an unknown quantity at this point
You should remove slashes before double quotes, because if " symbols are inside single quotes ' you don't need slashes before them
phpdude is offline   Reply With Quote
Old 07-12-2012, 06:57 PM   PM User | #4
Feckie
Regular Coder

 
Join Date: Jan 2009
Posts: 196
Thanks: 29
Thanked 0 Times in 0 Posts
Feckie has a little shameless behaviour in the past
Yep it's inside php tags




Quote:
Originally Posted by Arcticwarrio View Post
is it inside <?PHP tags or <HTML> tags?

PHP Code:
<?php
echo '<a href="' $link '" target="_blank"><img src="./images/' $categorie '.png" width="40" height="40" border="1" title="' $categorie '"></a> ';
?>

<html>
<BODY>
<a href="<?php echo $link;?>" target="_blank"><img src="./images/<?php echo $categorie?>.png" width="40" height="40" border="1" title="<?php echo $categorie?>"></a>
</BODY>
</html>
Sorted it' I wasn't calling it properly ... Duh!

Last edited by Feckie; 07-12-2012 at 07:08 PM..
Feckie is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:35 AM.


Advertisement
Log in to turn off these ads.