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 8741265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:16:52+00:00 2026-06-13T11:16:52+00:00

I have to follow code: <div class=beeldengeluid-infobox style=float: right; margin: 0em 0em 1em 1em;

  • 0

I have to follow code:

<div class="beeldengeluid-infobox" style="float: right; margin: 0em 0em 1em 1em; border: 1px #999 solid; background-color: #ffffff;">
<table border="0" cellspacing="0" cellpadding="5" width="300" summary="samenvattend persoonsoverzicht">
      <tr><td colspan="2" style="font-size:8pt;text-align:center;padding:4pt;line-height:1.25em"><div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:252px;"><img alt="" src="http://www.beeldengeluidwiki.nl//images/thumb/c/c8/Claudia_de_Breij_%28c%29_Corbino.jpg/250px-Claudia_de_Breij_%28c%29_Corbino.jpg" width="250" height="333" class="thumbimage" />  <div class="thumbcaption"><div class="magnify"><img src="http://www.beeldengeluidwiki.nl//skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></div>Claudia de Breij<br>Foto: <a rel="nofollow" target="_blank" class="external text" href="http://www.corbino.nl/">Corbino</div></div></div></div></td></tr>
      <tr><th>Naam</th><td>Claudia de Breij</td></tr>
      <tr><th>Geboren</th><td>Utrecht, 13 maart 1975</td></tr>
      <tr><th>Functies</th><td>Presentator, Cabaretier</td></tr>
      <tr><th>Bekend van</th><td><i>VARA laat</i>, <i>De wereld draait door</i>, <i>VARA live</i>, <i>De kunst van het maken</i>, <i>Claudia d'r op</i></td></tr>
      <tr><th>Periode actief</th><td>1995 - heden</td></tr>
      <tr><th>Werkt samen met</th><td>Dolf Jansen, Jan Mulder</td></tr>
      <tr><th>Trivia</th><td>Is getrouwd met presentatrice Conny Kraaijeveld</td></tr>
      <tr><th>Media</th><td><div><map name="ImageMap_1_902718077"><area href="http://www.beeldengeluidwiki.nl/index.php/Audio:_Claudia_de_Breij" class="plainlinks" rel="nofollow" shape="rect" coords="0,4,26,25" alt="Audio fragmenten" title="Audio fragmenten"/></map><img alt="Audio.png" src="http://www.beeldengeluidwiki.nl//images/7/72/Audio.png" width="25" height="23" usemap="#ImageMap_1_902718077"/></div></td></tr>
      <tr><th>Externe info</th><td><a rel="nofollow" target="_blank" class="external text" href="http://www.claudiadebreij.nl/">officiële site</td></tr>
      <tr><td colspan="2"><br/>Claudia de Breij in de media<br/>Oeuvre van Claudia de Breij</td></tr>
      </table>
    </div>
   <p>Claudia de Breij is cabaretière, zangeres en radio- en televisiepresentatrice.     
   </p>
   <hr />

Now I want to get the image url which is variable. For that I have this code:

  <div class="thumbinner" style="width:252px;"><img alt="" src="/images/thumb/0/03/HettyBlok.jpg/250px-HettyBlok.jpg" width="250" height="278"           class="thumbimage" /></div>

But I don’t know how to get this.

How can I get the image url?

I tried this:

preg_match('@<img.+src="(.*)".*>@Uims', $cm->rev, $matches);
$src = $matches[0];
echo $src;  

This works for me, but now i want to get i with the div because there are more then one images in the source and i want the correct image.

I’ve tried this:

preg_match('/<div class = "thumbinne" style="width:252px;"><img.+src="(.*)".*><\/div>/s',$cm->rev,$matches);
$src = $matches[0];
echo $src;      

But that doesn’t work.

  • 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-06-13T11:16:53+00:00Added an answer on June 13, 2026 at 11:16 am

    You can use DOM Parse:

    $dom = new DOMDocument;
    $dom->loadHTML('<div class="thumbinner" style="width:252px;"><img alt="" src="/images/thumb/0/03/HettyBlok.jpg/250px-HettyBlok.jpg" width="250" height="278" class="thumbimage" /></div>');
    $x = new DOMXPath($dom); 
    
    foreach($x->query("//img") as $node) 
    {
        echo $node->getAttribute("src");
    }
    

    Working Sample: http://codepad.org/szqI92Z8

    Another way:

    $dom = new DOMDocument;
    $dom->loadHTML('<div class="beeldengeluid-infobox" style="float: right; margin: 0em 0em 1em 1em; border: 1px #999 solid; background-color: #ffffff;">
    <table border="0" cellspacing="0" cellpadding="5" width="300" summary="samenvattend persoonsoverzicht">
          <tr><td colspan="2" style="font-size:8pt;text-align:center;padding:4pt;line-height:1.25em"><div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:252px;"><img alt="" src="http://www.beeldengeluidwiki.nl//images/thumb/c/c8/Claudia_de_Breij_%28c%29_Corbino.jpg/250px-Claudia_de_Breij_%28c%29_Corbino.jpg" width="250" height="333" class="thumbimage" />  <div class="thumbcaption"><div class="magnify"><img src="http://www.beeldengeluidwiki.nl//skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></div>Claudia de Breij<br>Foto: <a rel="nofollow" target="_blank" class="external text" href="http://www.corbino.nl/">Corbino</div></div></div></div></td></tr>
          <tr><th>Naam</th><td>Claudia de Breij</td></tr>
          <tr><th>Geboren</th><td>Utrecht, 13 maart 1975</td></tr>
          <tr><th>Functies</th><td>Presentator, Cabaretier</td></tr>
          <tr><th>Bekend van</th><td><i>VARA laat</i>, <i>De wereld draait door</i>, <i>VARA live</i>, <i>De kunst van het maken</i>, <i>Claudia d\'r op</i></td></tr>
          <tr><th>Periode actief</th><td>1995 - heden</td></tr>
          <tr><th>Werkt samen met</th><td>Dolf Jansen, Jan Mulder</td></tr>
          <tr><th>Trivia</th><td>Is getrouwd met presentatrice Conny Kraaijeveld</td></tr>
          <tr><th>Media</th><td><div><map name="ImageMap_1_902718077"><area href="http://www.beeldengeluidwiki.nl/index.php/Audio:_Claudia_de_Breij" class="plainlinks" rel="nofollow" shape="rect" coords="0,4,26,25" alt="Audio fragmenten" title="Audio fragmenten"/></map><img alt="Audio.png" src="http://www.beeldengeluidwiki.nl//images/7/72/Audio.png" width="25" height="23" usemap="#ImageMap_1_902718077"/></div></td></tr>
          <tr><th>Externe info</th><td><a rel="nofollow" target="_blank" class="external text" href="http://www.claudiadebreij.nl/">officiële site</td></tr>
          <tr><td colspan="2"><br/>Claudia de Breij in de media<br/>Oeuvre van Claudia de Breij</td></tr>
          </table>
        </div>
       <p>Claudia de Breij is cabaretière, zangeres en radio- en televisiepresentatrice.     
       </p>
       <hr />');
    $x = new DOMXPath($dom); 
    
    $images = array();
    
    foreach($x->query("//div[contains(@class,'thumbinner')]/img") as $node) 
    {
      $images[]=$node->getAttribute("src");
    }
    
    echo "<pre>";
    print_r ($images);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the follow code: // CSS .foo strong { float: right; } //
I have menu bar and code is as follows <div style=background:#000; height: 25px;> <div
I have the following code : <td> <div id=div<%# Eval(Id) %> class=Display><%# Eval(Display) %></div>
I have the follow code that allows me to drag a div into 3
I need to do a slideshow, with the follow code: <div id=galerry-one class=gallery> <div
I have 3 html box as follow: <div class=tabs> <ul class=tabNav> <li><a href=#video>Video Gallery</a></li>
I have the following HTML code: <div id=summary_form> <textarea class=summary>Please fill in</textarea><br/> <textarea class=summary>Please
I have this follow code in my javascript. I call this function when the
i have the follow code: searchResults.SearchResultCollection.Add( new SearchResult() { Header = HttpUtility.HtmlDecode( htmlDocument.DocumentNode .SelectSingleNode(initialXPath
So... is strange, I have the follow code in my Window control for setting

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.