PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$filename = 'clan/test.csv';
if (file_exists($filename))
{
unlink($filename);
}
$label = fopen($filename, 'a') or die("Couldn't open file.");
@fwrite($label, $label_string) or die("Couldn't write to file.");
fclose($label);
This code is inside a while loop, so should write one line for each pass of the loop. For some reason it stops after one line. I know the loop is executing as the content on the page prints out correctly.
Last edited by rsmarsha on Thu Aug 31, 2006 7:09 am, edited 1 time in total.