List Info

Thread: note 78493 added to ref.xml




note 78493 added to ref.xml
user name
2007-10-15 04:17:02
I enhance xml2array (can't remember who author) to work with
duplicate key index by change "tagData" function
with this ->

<?
  function tagData($parser, $tagData) {   

    // set the latest open tag equal to the tag data

    $strEval = "$this->arrOutput";
    foreach ($this->arrName as $value) {
      $strEval .= "[" . $value . "]";
	  $arr .= "[" . $value .
"]";		//*Enhance by T•J (array when dup)
    }

	eval("$x=$this->arrOutput" . $arr .
";");		//*Enhance by T•J (array when dup)
	if($x) { $strEval = $strEval . "[" .
++$this->arrOutput[$arr] . "] = $tagData;";
}		//*Enhance by T•J (array when dup)
	 else { $strEval = $strEval . " = $tagData;"; }
    
    eval ($strEval);
  }
?>

I not sure have another do it now.
Hope!!! It will help your work.
----
Server IP: 203.121.145.99
Probable Submitter: 203.155.179.11
----
Manual Page -- http://www.p
hp.net/manual/en/ref.xml.php
Edit        -- https://master
.php.net/note/edit/78493
Del: integrated  -- h
ttps://master.php.net/note/delete/78493/integrated
Del: useless     -- http
s://master.php.net/note/delete/78493/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78493/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78493/spam
Del: non-english -- 
https://master.php.net/note/delete/78493/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78493/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78493
Reject      -- https://mast
er.php.net/note/reject/78493
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )