Excellent find!  Thank you!  You have managed to solve an age old problem
for me :-)

- Robert 

-----Original Message-----
From: Paul Simon [mailto:[EMAIL PROTECTED] 
Sent: 15 April 2008 17:03
To: fw-general@lists.zend.com
Subject: [fw-general] Zend_Config_Ini - keys as an array

Hi,

I've been using Zend_Config_Ini successfully in a number of applications.
I'm wondering if the following is the correct way to configure arrays? My
concern is that I don't see it documented anywhere to add brackets to the
end of keys, like plugin[]. I just happened on a comment at
[http://us.php.net/manual/en/function.parse-ini-file.php#75983] saying it
can be done. Does anybody else use 'key[]' to configure arrays? Thanks, Paul

Set config.php
---------------
[Production]
; plugins
plugin[] = Init
plugin[] = Authenticate
plugin[] = Access
plugin[] = Wrapper

Get array
---------------
$conf = new Zend_Config_Ini('config.php','Production');
$plugins = $conf->plugin->toArray();

Dump $plugins
---------------
array (
  0 => 'Init',
  1 => 'Authenticate',
  2 => 'Access',
  3 => 'Wrapper',
)






________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________


________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________

Reply via email to