Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4233450
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:13:20+00:00 2026-05-21T02:13:20+00:00

Hello how can I add a <img src=*****><br> at the end of every match

  • 0

Hello how can I add a <img src=*****><br> at the end of every match but without array because I will encode the results?

preg_match_all('!http://.+\.(?:jpe?g|png|gif)!Ui', $content, $filtered);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:13:20+00:00Added an answer on May 21, 2026 at 2:13 am
    if(preg_match_all('#http://[\S]+(?:jpe?g|png|gif)#is', $html, $matches)){
    $i = 0;
    foreach($matches[0] as $value){
        if(in_array($i, array(0, 3))) continue;
        $img .= '<img src="'.$value.'"><br>';
        $i++;
        }
    }
    
    echo $img;
    

    Output (removed domain name by hand)

    <img src="http://galerije/ford%20focus/qy974l.jpg"><br><img src="http://galerije/ford%20focus/m8zhh0.jpg"><br><img src="http://galerije/ford%20focus/ifpixx.jpg"><br><img src="http://galerije/ford%20focus/1zvzof8.jpg"><br><img src="http://galerije/ford%20focus/ir8cqv.jpg"><br><img src="http://galerije/ford%20focus/9vjtrd.jpg"><br><img src="http://galerije/ford%20focus/2m29p4j.jpg"><br><img src="http://galerije/ford%20focus/znm0yt.jpg"><br><img src="http://galerije/ford%20focus/2ln8l7t.jpg"><br><img src="http://galerije/ford%20focus/mta0ap.jpg"><br>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have: localStorage.xxx = JSON.stringify([[something,hello],[something2,hello2]]); . How can i add a new array in
Hello Guys can anyone Explain me How to add UILocalNotifications to an Array
Hello I try to use PcapDotNet dll but I can't add reference to my
So here's sample HTML: <p>Hello</p> <p>World</p> <p><img src=catpic.jpg /></p> How can I apply text-indent
Hello guys I can't provide the code but you can see it on the
Hello, how can I add an HH:MM time to a li tag based on
chaning xml attributes through jquery is easy-peasy, just: $(this).attr('name', 'hello'); but how can I
Hello how can I add an echo $name inside of this line ? <?php
Hello how i can add page loading progress in it . when the page
Hello I have something like div.find(input).autocomplete({ ..... and am wondering if I can add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.