ini to object
By: fruffl | Date: Jan 25 2010 21:19 | Format: PHP | Expires: never | Size: 430 B | Hits: 949
- <?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
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago