ini to object
By: fruffl | Date: Jan 25 2010 21:19 | Format: PHP | Expires: never | Size: 430 B | Hits: 938
- <?php
- public function ini($path)
- {
- $INI = new ArrayObject();
- $INI->setFlags(ArrayObject::ARRAY_AS_PROPS);
- foreach($ini as $group => $items)
- {
- $INI->$group = new ArrayObject();
- $INI->$group->setFlags(ArrayObject::ARRAY_AS_PROPS);
- foreach($items as $item => $value)
- $INI->$group->$item = $value;
- }
- return $INI;
- }
Latest pastes
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago