Project

General

Profile

Actions

Feature #15342

closed

t3div_lib::array2xml problem when encounters multiples of the same tag

Added by Brice BERNARD over 18 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2005-12-31
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

when parsing this xml code :


<moldb>

&lt;molecule&gt;
&lt;name&gt;Alanine&lt;/name&gt;
&lt;symbol&gt;ala&lt;/symbol&gt;
A
&lt;type&gt;hydrophobic&lt;/type&gt;
&lt;/molecule&gt;
&lt;molecule&gt;
&lt;name&gt;Lysine&lt;/name&gt;
&lt;symbol&gt;lys&lt;/symbol&gt;
K
&lt;type&gt;charged&lt;/type&gt;
&lt;/molecule&gt;

</moldb>

we have this array :

Array
(
[molecule] => Array
(
[name] => Lysine
[symbol] => lys
[code] => K
[type] => charged
)
)

The tags are overwriting it would be great to obtain this instead (when multiple tags...) :

Array
(
[molecule] => Array
[0] =>
(
[name] => Alanine
[symbol] => ala
[code] => A
[type] => hydrophobic
)
[1] =>
(
[name] => Lysine
[symbol] => lys
[code] => K
[type] => charged
)
)

(issue imported from #M2149)

Actions

Also available in: Atom PDF