document_element(); $node_array = $root->get_elements_by_tagname('item'); $count=0; foreach ($node_array as $node) { //only want 10, most wordpress blogs only //output 10 posts to the feed file anyhow if($count == 10) break; $inner_node_array_link = $node->get_elements_by_tagname('link'); $inner_node_array_title = $node->get_elements_by_tagname('title'); $inner_node_array_desc = $node->get_elements_by_tagname('description'); //optional - alternating TD colours if($count%2 != 0) { $color = "#EEEEEE"; } else { $color = "#FFFFFF"; } if($count == 0) echo ""; //the title/link to blog post //str_replace is used as sometimes extra chars get outputted??? echo ""; if($count == 9) echo "
get_content())) ."\" href=\"" . $inner_node_array_link[0]->get_content() ."\">" . $inner_node_array_title[0]->get_content() . "
"; $count++; } } ?>