Jump to content

JERO79

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JERO79

  • Rank
    Newbie
  1. I am using the code below to extract some information from a website: $doc = new DOMDocument();$doc->loadHTML($html);$xpath = new DomXpath($doc); foreach($xpath->query('//img/@alt') as $node){ echo $node->nodeValue."|";} An example of the output is: 1|3|.5|statusB|8|5|.0| I want to use the code below to split this output in parts: $splitdata = explode('|', $input);echo "$splitdata[0], $splitdata[1], $splitdata[2], $splitdata[3], $splitdata[4], $splitdata[5], $splitdata[6]"; But how can I get the output from echo $node->nodeValue."|"; into the string $input?
×
×
  • Create New...