Page 1 of 1

fwrite variable to new file

Posted: Mon Jan 21, 2008 1:51 pm
by MedianInf
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);
?>

Re: fwrite variable to new file

Posted: Mon Jan 21, 2008 2:47 pm
by Oren
echo fwrite($file, $custom_list); :? :? :?