i am using the following code :
$doc = new DOMDocument();
$doc->loadHTML($url);
$data = $doc->saveHTML();
preg_match_all("/$k1(.*?)$k2/s",$data,$matches);
and it’s generating this error :
Warning: preg_match_all() expects parameter 2 to be string, object given in /home/maruf10/public_html/dispatx.php on line 115
it will be helpful if anyone help to find the bug .
thanks
change
into
it should work then.