I read the data from the MySQL tables into string then i want to write the data to file.
I found this tutorial
Code: Select all
<?php
echo "test";
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Bobby Bopper\n";
fwrite($fh, $stringData);
$stringData = "Tracy Tanner\n";
fwrite($fh, $stringData);
fclose($fh);
?>
i assume its supposed to write CRLF for the line return but if i open it in word or notepad it
shows a block.
I think depending what character system you use to open it with it will return the line ? am i right ?