I have the following test script:
It is best to use PHP_EOL. This is cross-platform, so it automatically chooses the correct newline character(s) for the platform PHP is currently running on.
PHP_EOL
$stringData = "Floppy Jalopy" . PHP_EOL;
PHP Constants