PHP Classes

File: examples/collection/example1.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/collection/example1.php   Download  
File: examples/collection/example1.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 487 bytes
 

Contents

Class file image Download
<?php
include 'config.php';

$configdata = array(
   
'APP' => '/path/to/app/',
   
'BASE' => 'http://www.example.com',
);
$config = new A_Collection($configdata);
$config->import(simplexml_load_file("example.xml"), 'xml');
$config->import(parse_ini_file("example.ini", true), 'ini');

echo
"\$config->xml->first_section->animal = {$config->xml->first_section->animal}<br/>";
echo
"\$config->ini->first_section->animal = {$config->ini->first_section->animal}<br/>";
dump($config);