Jump to content

Set NodeValues to Array Help


twittoris

Recommended Posts

I would like to place the output of these node values into an array:

foreach ($rows as $row) 
    { 
        /*** get each column by tag name ***/ 
	$cols = $row->getElementsByTagName('td');
        /*** echo the values ***/ 
        echo $cols->item(0)->nodeValue.'<br />'; 
        echo $cols->item(1)->nodeValue.'<br />'; 
        echo '<hr />'; 
    }

 

If the echo $cols->item(0)->nodeValue.'<br />'; always returns 6 values how can I call the values of each node later?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/213504-set-nodevalues-to-array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.