How does the \n character work in PHP for line breaks?
The \n character in PHP is used to create a line break in a string. When the \n character is included in a string, it tells PHP to start a new line at that point. This is commonly used when outputting text to create formatted output with line breaks.
// Example of using \n for line breaks in PHP
echo "This is line 1\n";
echo "This is line 2\n";
echo "This is line 3\n";