I'm fetch the html content using below code,
preg_match_all('/<div class="content">(.*?)<\/div>/s', $str, $matches);
echo $matches[1][0];
Content fetched correctly but some special char whit text not display properly like
“response to what?”
display as “response to what?â€
but it doesn’t
display as but it doesn’t matter.
and some blanck space display as Â
how to resolve this issue..?
You have unicode issues, try adding this as the first line in your script :
header('Content-Type: text/html; charset=utf-8');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With