It's unlikely that FTP will "put everything on one line". More likely is that the file uses *nix-style line endings and you uploaded the file in binary mode to a Windows machine, or something like that.
See, different platforms have different sequences of characters to represent "new line". In Windows, that's most commonly CR+LF, but on *nix, it's just LF. Problem being, lots of software assumes stuff about what line ending a text file should have, and if it sees a LF character, it doesn't see it as a newline character. So everything looks like it's on one line. (I didn't think PHP was so anal about line endings, but i've seen other languages that freak out over it.)
Binary mode transmits the file byte for byte, and doesn't convert line endings. Which is great if you're down- or uploading an image or something. But if you're transferring text files in binary mode between machines running different OSes, you're likely to see the results of "incorrect" line endings.
The solution: Use ASCII mode for PHP files. Most FTP clients have settings for what mode to use, and even what mode to use for certain types of files. Since PHP files are text, they should probably be transferred in ASCII mode in most cases.