Reputation: 2347
I'm aware that PHP ignores enters/white spaces and the \n character doesn't work within a string, so how would one do this?
Upvotes: 0
Views: 78
Reputation: 26783
Why do you think \n doesn't work within a string? It does work.
You can do:
"asd\nasd"
Or:
"asd
asd"
Both will work just fine.
However:
'asd\nasd'
has the actual characters \n not a newline, so check which quotes you are using.
But:
'asd
asd'
works fine.
Upvotes: 3