When I execute this:
$filename = "test.php";
$content = "<?php $variable = 35 ?>";
file_put_contents($filename,$content);
The file contains this:
<?php =35?>
How can I get it to include the $variable ?
Also, how can I append this to the top of the file without overwriting existing data?