SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do i insert an alt tag into an variable <src ="myimage.jpg">

    $my_image that has a value of <src ="myimage.jpg">

    How can I modify $my_image to make it <src ="myimage.jpg" alt="my description">

    Thanks

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi,

    Unless I'm missing something you can simply do:
    Code PHP:
    $my_image = '<src ="myimage.jpg" alt="my description">';


Bookmarks

Posting Permissions

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