Try to change your '
to "
– php interprets a string inside single quotes as literals, whereas with quotes ("
) it will expand the \r\n
to what you want.
More information: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single