I have an xPath request that grabs plaintext from a div as
xpath->query("//div[@id='main']//span[@class='meta']/text()")
This query returns The text that I want,
Anyway, can I remove this comma in my query?
thank
EDIT:
Using the Mad code below, my query now looks like this (I replaced the ,word in the example helloto make it a little less confusing.)
$search_term = $xpath->query("translate('//div[@id='main']//span[@class='meta']/text()', 'hello', '')");
And I am trying to repeat the results of the query as follows:
foreach ($search_term as $st) {
echo $st->nodeValue; }
The error I get is
Invalid argument supplied for foreach() in ... on line 50
rocky source
share