fwrite variable to new file
Posted: Mon Jan 21, 2008 1:51 pm
I'm trying to use fwrite to create a new file with the variable "custom_list" but its just creating a blank file - the variable "custom_list" doesn't show up. Here's my code:
<?php
$file = fopen("list_test.php","w+");
echo fwrite($file, $custom_list);
//some code to be executed
fclose($file);
?>
<?php
$file = fopen("list_test.php","w+");
echo fwrite($file, $custom_list);
//some code to be executed
fclose($file);
?>