Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2009
    Posts
    197
    Thanks
    29
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    709
    Thanks
    20
    Thanked 84 Times in 84 Posts
    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>

  • #3
    New Coder
    Join Date
    May 2012
    Posts
    17
    Thanks
    0
    Thanked 3 Times in 3 Posts
    You should remove slashes before double quotes, because if " symbols are inside single quotes ' you don't need slashes before them

  • #4
    Regular Coder
    Join Date
    Jan 2009
    Posts
    197
    Thanks
    29
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •