Hello, $name! - Arshdeep, This is on a new line: \n
Hello, Arshdeep! - Arshdeep, This is on a new line:
In PHP, single-quoted strings are treated literally. With variables and escape sequences (like \n) are not interpreted as plain normal text. With Double-quoted strings. Now are parsed by PHP, meaning the variables inside them are replaced with their actual real values, and escape sequences such as \n (newline) or \t (tab) are converted into their special chracterized meanings. Due to the parsing, double-quoted strings are slightly slower to process but far more flexible, while single-quoted strings are faster as well assafer when you want the text to remain exactly how you typed them.