I know file() can read a file to array.
Do you know write-back the array to file?
I have about 50000 lines in the file.
I didn't want use a while ... fput...
do this.
There aren't any built in functions to do that but you could use $newVar=implode("\n",$yourArray) to put the entire array into one variable (with each element seperated by a newline) and then just fput the $newVar.