Tell me pls, how to resize inline (not reply) buttons in a Telegram bot? The docs does not say anything at all about the resize of inline buttons.
Code:
foreach ($sections as $section) {
$arrKeyboard[] = [
'text' => $section->getTitle(),
'callback_data' => '....'
];
}
$keyboard = new TelegramBotApiTypesInlineInlineKeyboardMarkup([$arrKeyboard]);
$telegramBot->sendMessage($message->getChat()->getId(), $answer, 'markdown', false, null, $keyboard);
2
Answers
You can use
array_chunk
function to set how many items should be displayed in each row.