我如何在身体问题中获得这些价值观,

单击内联按钮查询时,如何获取电报bot的这些数组的“ callback_data”的值

stdClass Object
(
    [inline_keyboard] => Array
        (
            [0] => Array
                (
                    [0] => stdClass Object
                        (
                            [text] => btn1
                            [callback_data] => v
                        )

                    [1] => stdClass Object
                        (
                            [text] => btn2
                            [callback_data] => r
                        )

                )

        )

)
评论
dnulla
dnulla

You've got stdClass objects in your array, properties of which are accessed with arrow notation (->).

$yourVariable->inline_keyboard[0][0]->callback_data

$yourVariable->inline_keyboard[0][1]->callback_data

点赞
评论