I am trying to write in a configuration file, problem that it does not print $names
<?php
$myfile = fopen("config.php", "w") or die("Unable to open file!");
$txt = "$dbname = '1'; $dbuser = '2'; $dbpass = '123'; $dbhost = 'localhost';\n";
fwrite($myfile, $txt);
fclose($myfile);
?>
The output shows me
= '1'; = '1'; = '123'; = 'localhost';
I need he write the variables names, need some help, thanks!