glenelkins Posted May 28, 2006 Share Posted May 28, 2006 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:[code]<?php $prods = "http://1564.tchosts3.net/TEMPLATES/Template2/product.asp?intProdID=SVFUJ-879133-001"; $data = file($prods); foreach ($data as $dt) { $content=htmlentities($dt); echo nl2br($content); } ?>[/code]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 "". Quote Link to comment https://forums.phpfreaks.com/topic/10642-extracting-code-from-html/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.