Welcome Guest, Not a member yet? Register   Sign In
Filter special characters from xpath in PHP
#1

[eluser]OJ[/eluser]
When I run an xpath query e.g.
$xpath2 = new DOMXPath( $html2 );
$str=$xpath2->query("id('main')/table[2]//tr[5]/td/p[1]")->item(0)->nodeValue)));

in my code and display them in a webpage, I see special characters like:
•Â

I have tried to use preg_replace to filter them but because they can come in different varieties it is difficult to replace all. I need help with a php function to use to remove them and clean up the returned string.
Any help will be appreciated.
Thanks,
#2

[eluser]vanquish[/eluser]
I am having the same problem myself. If anyone could provide any insights, it would be greatly appreciated!




Theme © iAndrew 2016 - Forum software by © MyBB