[Typo3-dev] Numeric indexes in XML
John Begley
John.Begley at hummingbird.com
Fri Sep 24 15:25:58 CEST 2004
>AFAIR there is the attribute "index". If the value of index is numeric
>the resulting php array will be numeric entry, if not it will be a hash
>entry.
>
>So this
>
><elements>
> <element index="a">III</element>
> <element index="b">IV</element>
> <element index="0">I</element>
> <element index="1">II</element>
></elements>
>
>will become this
>
>array( 'I', 'II', 'a'=>'III', 'b'=>IV');
Thanks for that. I finally got it working. The section of the
<t3DataStructure> looks basically like this:
<items>
<choice1>
<value index="0">Choice 1</value>
<key index="1">c1</key>
</choice1>
<choice2>
<value index="0">Choice 2</value>
<key index="1">c2</key>
</choice2>
</items>
John
More information about the TYPO3-dev
mailing list