I want to search a particular word from a string
here is it

$str="<a href"
is there any way to find this link embedded in the string .... and if found it must echo "found.....................

Recommended Answers

All 2 Replies

<h1>Img src</h1>
$content= 'www.example.com';//curl this site using curl function
$doc6 = new DOMDocument();
$list = $doc6->getElementsByTagName("img");
for ($i = 0; $i < $list->length; $i++) {
    print($list->item($i)->nodeValue . "<br/>\n");

or contact this site

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.