maknz / slack

A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
BSD 2-Clause "Simplified" License
1.17k stars 204 forks source link

Cant use \n in Message Attachment #12

Closed rained23 closed 9 years ago

rained23 commented 9 years ago

Hi, I am not sure why new line are not working.

I added \n to my 'text' but it didn't produce a new line.

By the way, this is an awesome package.

maknz commented 9 years ago

Make sure you're using double quotes " rather than single quotes ' to enclose your string. It works for me when double quotes are used.

http://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in-php

Single quoted strings will display things almost completely "as is." Variables and most escape sequences will not be interpreted.

rained23 commented 9 years ago

Will check it soon. Thx. On Feb 6, 2015 5:08 AM, "Regan McEntyre" notifications@github.com wrote:

Make sure you're using double quotes " rather than single quotes ' to enclose your string. It works for me when double quotes are used.

— Reply to this email directly or view it on GitHub https://github.com/maknz/slack/issues/12#issuecomment-73128977.