Skip to content
Advertisement

PHP: Telegram Bot: Insert line break to text message

"n" and "rn", tested in text message sent by telegram bot, to create line break. Instead of showing line break, underline _ will appear after using them.

How I could printing line feed in telegram message sent by bot?

CODE

JavaScript

Message Demo enter image description here

Any help will be appreciated.

Advertisement

Answer

There is a better way! The problem is because of URL encodings… You can use normal PHP text using n but by passing it to urlencode method, as follows:

JavaScript

It works for me!

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement