I need to read and write an array from/to a file.
The file is filled like this:
<?php
return array(
'Key' => 'value'
);
?>
I'm already able to read this file using
$data = include($path . DIRECTORY_SEPARATOR . $file);
How can i write this array back to the file while keeping the structure of '<?php return array(); ?>'?
file_put_contents()+var_export()