I've got several config files, and I'm trying to add them together by including them all in my script.
This returns an error [] operator not supported for strings, but $config is not a string?
I've tried declaring my array first like $config = []; and $config = array();, with no luck.
File: config1.php
$config[] = array(
'database' => array(
'name' => 'test'
)
);
File: config2.php
$config[] = array(
'sarCallbacks' => array(
'test1',
'test2',
'test3'
)
);
If I put the array key in the $config index, it gets even worse.
What am I doing wrong?
Note: I'm running PHP 5.5.9.
array()$configas a string somewhere?$config, usingforeach()doesn't change the scope :)