I have an array in a file and I want to change a value from this and write it back to file like the original file.
My file with the array:
return [
'modules' => [
'test-module1' => 1,
'test-module2' => 1,
],
];
I want to replace a value (the numbers) and write it back like this style to a file with PHP (when it's possible).
E.g. I want to disable test-module1 and set key to 0. What is the best way. I've no plan at this time.
EDIT: I know how to change the key but I don't know how to write it back to the file.
serialize()format.var_exportfunction*.phpfile?