1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help for alt tags - php - image...

Discussion in 'PHP' started by tptnyc, Jun 15, 2007.

  1. #1
    Tried alt tags 'quality ribbons' here but it gives error. I think because of backward \ slash which of course can't be removed since it is a index.php file. Need help on inserting alt tags at the right place.


    <tr>
    <? echo "<td valign=top align=left ><a href=index.php ><img src=\"images/banner.JPG\" border=0</a>
    </td>"; ?>
    </tr>
     
    tptnyc, Jun 15, 2007 IP
  2. jmhyer123

    jmhyer123 Peon

    Messages:
    542
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this alt. method:
    <tr>
    <?php echo "<td valign=top align=left>"; ?>
    <a href="index.php"><img src="images/banner.jpg border="0" alt="ALT TEXT/DESCRIPTION"></a>
    <?php echo "</td>"; ?>
    </tr>

    Hope this is what you were looking for...
     
    jmhyer123, Jun 15, 2007 IP
  3. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #3
    is much easier to use <<< operator, don't need to escape chars

     
    gibex, Jun 15, 2007 IP
  4. jakomo

    jakomo Well-Known Member

    Messages:
    4,262
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    138
    #4
    echo "<a href='url'><img scr='image/banner.jpg' alt='".$VALUE_ALT."'></a>";

    :) Try this
     
    jakomo, Jun 15, 2007 IP
  5. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    finally it worked this way with \ backward slash at the end of alt tag.

    <tr>
    <? echo "<td valign=top align=left ><a href=index.php ><img src=\"images/banner.JPG\" border=0 alt='quality ribbons' \</a>
    </td>"; ?>
    </tr>

    Thank you guys.
     
    tptnyc, Jun 15, 2007 IP