Why is this little peice of script printing "Array" in my files instead of over writing them?
$filename = "file.txt";
$file_contents = file($file);
$new_file_contents = ereg_replace($value,'',$file_contents);
$fp = fopen($file,"a");
fputs($fp,$new_file_contents);
fclose($fp);