I have an xPath query that grabs plaintext from a div like this
xpath->query("//div[@id='main']//span[@class='meta']/text()")
This query returns The text that I want,
Is there anyway that I can remove that comma within my query?
Thanks
EDIT:
Using Mad's code from below, my query now looks like this (I've replaced the ,
in the example with the word hello
to make it a bit less confusing.)
$search_term = $xpath->query("translate('//div[@id='main']//span[@class='meta']/text()', 'hello', '')");
And I'm attempting to echo the query results like this:
foreach ($search_term as $st) {
echo $st->nodeValue; }
The error I'm receiving is
Invalid argument supplied for foreach() in ... on line 50