I am trying to load an Rss link and add the data into an array. Here is what I am trying:

$doc = new DOMDocument();
$doc2 = new DOMDocument();
 $arrFeeds = array();
foreach ($doc2->getElementsByTagName('item') as $node) {
		$itemRSS = array ( 
		   '<p class="style1">' => $node->getElementsByTagName('title')->item(0)->nodeValue,
			'</p>desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
			'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue
		array_push($arrFeeds, $itemRSS);
          function displayArrayContentFunction($arrayname,$tab="&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp",$indent=0) {
 $curtab ="";
 $returnvalues = "";
 while(list($key, $value) = each($arrayname)) {
  for($i=0; $i<$indent; $i++) {
   $curtab .= $tab;
  if (is_array($value)) {
   $returnvalues .= "<br /><table width='1009' border='1'><tr><td width='926'><br />\n";
   $returnvalues .= displayArrayContentFunction($value,$tab,$indent+1)."</td><td width='67'>&nbsp;</td></tr></table><br />\n";
  else $returnvalues .= "$curtab$key => $value<br />\n";
  $curtab = NULL;
 return $returnvalues;

echo displayArrayContentFunction($arrFeeds);

Now, I get an error Cannot clone object of class DOMDocument due to 'zend.ze1_compatibility_mode'.
I did change the value of zend.zel_compatibility=off both in php.ini and .htaccess file but still no luck. Please see if you can help, I really having a hard time with this.

PS. it does work on my localhost but not on the webserver when uploaded.

Many thanks in advance


This question has already been answered. Start a new discussion instead.