I want to write this array
$array = [
'key1' => 'value1',
'key2' => [
'subkey1' => 'value3'
],
'key3' => 'value4'
];
to the config, which should look like:
config.php
<?php
return [
'key1' => 'value1',
'key2' => [
'subkey1' => 'value3'
],
'key3' => 'value4'
];
?>
With this format I can later include the file like this:
index.php
$config = include 'config.php';
Is that possible with a common PHP function? I know, thats not possible with var_export and print_r.