I am trying to write php script in a file.It was sure to get Parsing error on that.Help me assign php code to a php variable so i can write it on code.
<?php
$myFile = "testFile1.php";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "<?php some php code with functions ?>";
fwrite($fh, $stringData);
fclose($fh);
?>