I like this kind of configuration because it's more cleaner therefore I have a configuration file with the following:
<?php
$Config['option_1'] = 'some value';
$Config['option_2'] = 'some value';
$Config['option_3'] = 'some value';
?>
Then i have a class with a method to load this kind of configuration files It's very similar with how CodeIgniter loads the configuration files except when i include this file I get:
Warning: Illegal string offset 'option_1' in 'Path to the config file' on line #.
Warning: Illegal string offset 'option_2' in 'Path to the config file' on line #.
Warning: Illegal string offset 'option_3' in 'Path to the config file' on line #.
etc. You get the idea.
I've searched everywhere on how to use this kind of configuration system on a site but no result. So if anyone has a link to a tutorial or some documentation on this then please help me understand how this works or why i get that error when I require the configuration file from inside a class using one of it's methods.
Note. When i load the configuration file directly into the browser I get no errors and I can successfully echo out any values using "echo $Config['option_1'];"