Jump to content


This topic is now archived and is closed to further replies.


Extracting Code From HTML

Recommended Posts

I have a project where as i have to get some HTML code and take out an image from <img src> tag.
Now i get the file in the following way:

    $prods = "http://1564.tchosts3.net/TEMPLATES/Template2/product.asp?intProdID=SVFUJ-879133-001";
    $data = file($prods);
                foreach ($data as $dt) {
        echo nl2br($content);

How do i check each of these lines in the loop to find the <img src=> tag, then to return only the text (filename of image) between the "".

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.