In the provided PHP script, what is the significance of using "\r\n" as a parameter for fwrite and how does it affect the output?

Using "\r\n" as a parameter for fwrite in PHP is important when writing text to a file, especially on Windows systems. This sequence represents a carriage return and a line feed, which is the standard line ending format on Windows. Without it, the text may not be displayed correctly when viewed in a text editor on Windows. Therefore, using "\r\n" ensures that the text is formatted properly for Windows systems.

<?php
$file = fopen("output.txt", "w");
fwrite($file, "Hello, world!\r\n");
fclose($file);
?>