我有一个这样的ini文件:
[hints]
menu.0 = "Hint: Dropping a element on parent element will move the selected element at the end of list!"
menu.1 = "Hint: Use Menu elements to beautify your navigator!"
menu.2 = "Hint: Pages in red means they are draft pages. Adding them to your menu means that your visitors can not see the page!"
并使用 Zend_Config_Ini 读取 ini 文件:
self::$hints = new Zend_Config_Ini(APPLICATION_PATH . '/configs/hints.ini',
'hints');
上的输出var_dump(self::$hints->menu);
是:
object(Zend_Config)[63]
protected '_allowModifications' => boolean false
protected '_index' => int 0
protected '_count' => int 3
protected '_data' =>
array (size=3)
0 => string 'Hint: Dropping a element on parent element will move the selected element at the end of list!' (length=93)
1 => string 'Hint: Use Menu elements to beautify your navigator!' (length=51)
2 => string 'Hint: Pages in red means they are draft pages. Adding them to your menu means that your visitors can not see the page!' (length=118)
protected '_skipNextIteration' => null
protected '_loadedSection' => null
protected '_extends' =>
array (size=0)
empty
protected '_loadFileErrorStr' => null
我需要帮助从该对象中随机挑选一个项目并显示它。