Zend_Config_Xml was not designed to support multiple values of the same
name to be represented as an array. Instead, you could do something like:
...
<emailList>
<subject1>...</subject1>
<subject2>...</subject2>
</emailList>
...
or maybe
...
<emailList>
<tech>...</tech>
<billing>...</billing>
</emailList>
...
Maybe Rob can chime in with his thoughts?
Best regards,
Darby
robert mena wrote:
> Hi,
>
> I am trying to use Zend_Config_Xml but a code like this
>
> $config = new Zend_Config_Xml('config/config.xml', 'devel');
>
> I should be able to do this, right?
>
>
> $config->emailList->subject[0]->email
>
>
> But in my test I can only access the last value (in this example the
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>). If I use simple_xml I can
> access
> with no problem.
>
> <? xml version="1.0" encoding= "UTF-8" ?>
>
> <configdata>
>
> <production>
>
> </production>
>
> <staging>
>
> </staging>
>
> <devel>
>
> <emailList >
>
> <subject >
>
> <item >Tech </item >
>
> <email> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]></email>
>
> </subject >
>
> <subject >
>
> <item >Billing </item >
>
> <email> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]></email>
>
> </subject >
>
> </emailList >
>
> </devel>
>
> </configdata>
>
>
>