Easy file question
Posted: Sat May 17, 2003 10:15 pm
I've searched a bunch of places but haven't had much luck... How would you write into a file with multiple lines... lets say from an array and each
part of the array has its own line... I believe I have done it before I have
just completely forgotten how to!
I've tried using the "\n" and still doesn't work...
Here is my code:
Thanks in advance!
part of the array has its own line... I believe I have done it before I have
just completely forgotten how to!
I've tried using the "\n" and still doesn't work...
Here is my code:
Code: Select all
$xї0] = "Hello";
$xї1] = "waldo";
$x = implode("\n", $x);
$fp = fopen("x.txt", "wt");
fwrite($fp, $x);
fclose($fp);