I have a .php file that contains array data like below:
$config['setting_one'] = true;
$config['setting_two'] = "some string";
$config['setting_three']['option1'] = "some string";
What is the correct way to find the line starts with $config['setting_two']
and replace the line with $config['setting_two'] = "new string";
(new string will come from a post value).