PHP code example of juststeveking / config

1. Go to this page and download the library: Download juststeveking/config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

juststeveking / config example snippets


// app.php
return [
    'name' => 'super cool app',
    'version' => 'v1.0.0',
    'items' => [
        'router' => 'awesome php router'
    ]
];

$appConfig =  available
$config->get('items.router'); // will return "awesome php router"
$config->getMany(['name', 'version']); // will return ['name' => 'super cool app', 'version' => 'v1.0.0']
$config->set('items.database', 'pdo'); // will set 'database' => 'pdo' on the items array
$config->all(); // will reurn the entire config array