html - Use Markdown code block in Telegram PHP API

I want to send code block with telegram bot in PHP language.
I already use "`", but I did not get any result.

I use HTML parse_mode.

Answer

Solution:

there are 2 formatting options: https://core.telegram.org/bots/api#formatting-options

also see parse_mode in sendMessage: https://core.telegram.org/bots/api#sendmessage

you should set it in this param and then use concurrent formatting (markdown in your case)

UPD if you use html mode, use <code> for inline block and <pre> for multiline

Source