I appended a "\r\n" instead of just the "\n" and it works fine, meaning when I view the file on the server, it now contains a new line for each entry.
On another note . . .
I have a list box function that I built in PHP. It reads the list entries from a txt file and builds the list box selections based upon that. This way, no coding changes are necessary if the list ever changes, only the txt file need be modified.
This all works fine until I get to the end of the txt file. I cannot seem to get the function to ignore null lines. I've tried trapping for "", "\r", "\n", "\r\n" but nothing seems to work. It reads the line anyway and screws up the end of the list, putting a blank entry in the list box. The only fix I have found so far is to make sure that the txt file does not contain a CR after the last entry.
This should be an elementary string parsing issue, but it's got me stumped.
Any suggestions?