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.

How to take second link form a string?

Discussion in 'PHP' started by KingCobra, Oct 2, 2020.

  1. #1
    Ho can I take & keep the 2nd url / link in a string (suppose $myUrl) from the following string?

    $myString = '<div class="thumbnail-container animate-lazy" style="padding-bottom:52.533%"><img width="750" height="394" src="https://bbbbb.com/wp-content/themes/jnews/assets/img/jeg-empty.png" class="attachment-jnews-featured-750 size-jnews-featured-750 lazyload wp-post-image" alt="Ron DeSantis & Protesters" data-src="https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-750x394.jpg" data-sizes="auto" data-srcset="https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-750x394.jpg 750w, https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-300x158.jpg 300w, https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-1024x538.jpg 1024w, https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-768x403.jpg 768w, https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-1140x599.jpg 1140w, https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3.jpg 1200w" data-expand="700" /></div>';
    Code (markup):

     
    KingCobra, Oct 2, 2020 IP
  2. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    solved
     
    KingCobra, Oct 2, 2020 IP