Closed timh77 closed 6 years ago
In the CowBot just \n does the trick:
$content = array('chat_id' => $chat_id, 'reply_markup' => $keyb, 'text' => "Welcome to CowBot \xF0\x9F\x90\xAE \nPlease type /cowsay or click the Cow button !");
$telegram->sendMessage($content);
U can simply used PHP_EOL. Predefined constant
Example: $text='hello world'.PHP_EOL.'next line';
Try: some text line one . "\n" . Some text line two... PS: double quotes.
Em 14 de jan de 2018 06:42, "Mohsen322" notifications@github.com escreveu:
U can simply used PHP_EOL. Predefined constant
Example: $text='hello world'.PHP_EOL.'next line';
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Eleirbag89/TelegramBotPHP/issues/123#issuecomment-357499644, or mute the thread https://github.com/notifications/unsubscribe-auth/ARCFox1Ajapf7Zqz9Wgpb_w34APdghK7ks5tKcwhgaJpZM4RdXjl .
Thanks all! Not sure what happend, tried the exact same code today again and it worked fine. Reminds me not to work during weekend ;-)
Hi,
Have tried almost every option I could think of to get a linebreak in the sendMessage function working. But nothing worked. Would you have any idea?
\n \n (escaped) %0A even linefeeds in the message string itself