I tried to use single quotes as much as possible, but I noticed that I can't use n inside single quotes. I know I could enter the newline character directly by pressing enter, but that would break the indentation of my code.
When I use single quotes, is there some ASCII character or something I can type that will produce a newline?
Use the constant PHP_EOL then it is also operating system independent.
No, because single quotes suppress even hex code replacement.