I have a string which is returned by a web service and contains the new line characters, "\n". When I try to output the string with the nl2br function, the string is returned as is, with "\n" inside the string.
Could it be possible that the new line character needs to have some special encoding to be identified as such or am I missing something trivial here?
Hex representation of the input string
48617570747374726173736520315c6e416e737072656368706172746e65723a204d6178204d75737465726d616e6e
` tag to the line breaks while my problem was that `nl2br()` did not change the string at all due to the literal `\n`. – Awemo Mar 03 '15 at 09:53