i have this code in a page called process.php to create a page dynamically.

$_SESSION['z']=$post;
$string = '<?php
$p='.$_SESSION['z'].'; 
  ?> ';   
$fp = fopen("$post.php", "w");
fwrite($fp, $string);
fclose($fp);

if $post=big
then it creates a page big.php with this code

<?php
$p=big; 
  ?>

but i want to write $p='big' instead of $p=big on the big.php page ..so how can i do it ??