note 82690 deleted from function.xml-parser-create by danbrown
| From: | danbrown@php.net | Date: | Mon, 04 Aug 2008 19:15:06 +0000 |
| Subject: | note 82690 deleted from function.xml-parser-create by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143144@lists.php.net to get a copy of this message | ||
Note Submitter: big_chief at gmx dot de
----
If you have multiple entries with the same key, exchange the lower part of the earlier mentioned
script by this and it should solve the problem:
if ($xml_elem['type'] == 'complete') {
$start_level = 1;
$php_stmt = '$params';
while($start_level < $xml_elem['level']) {
$php_stmt .= '[$level['.$start_level.']]';
$start_level++;
}
$php_stmt .= '[$xml_elem[\'tag\']]';
eval('$tmp = '.$php_stmt.';');
if (isset($tmp)) {
if (!is_array($tmp))
eval($php_stmt . ' = array( 0 => $tmp);');
eval($php_stmt . '[] = $xml_elem[\'value\'];');
} else
eval($php_stmt . ' = $xml_elem[\'value\'];');
}