Search code examples
phpnewlinequotesdouble-quotessingle-quotes

Making a new line with single quotes?


Can I do a line break like this '\n'?

Or do I must use double quotes - "\n"?


Solution

  • You have to use double quotes. Otherwise, PHP will literally output \n.

    http://php.net/manual/en/language.types.string.php