"\n"
and "\r\n"
, 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
$txt = 'با تشکر از عضویت شما، هر روز حدود ساعت 10 شب یک ویدئوی جالب برای شما ارسال خواهد شد.';
$txt .= " \n ";
$txt .= 'Thanks for joining, Every day at almost 18:30 GMT an intersting video will be sent';
Any help will be appreciated.
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:
$txt = urlencode("here is my text.\n and this is a new line \n another new line");
It works for me!