entering newline character in text file when using fgets()
Posted: Tue Dec 09, 2008 10:21 pm
i'm using the fgets() function to open, read, and print the contents a text file.
here's my code:
i'd really just like to clarify what and where to put newline characters in my text file so fgets() will recognize them
thanks.
here's my code:
Code: Select all
$handle = fopen("TVeedahl, Resume.txt", "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
thanks.