Sunday, April 16, 2017

how to create an array for reply keyboard for telegram bot api?

I want to create an array like this for telegram markup:

['بازگشت👆'],
['🛫 از آتن'],

I am using a foreach for this array like this:

$destination = array("بازگشت👆,");
            foreach ($getto->getCity as $key => $todes) 
            {
                $destination[]=array( "'🛬 به "."$todes->city" ." (از " . "$todes->price" ." تومان)'"); 
            }

bot it gave me an array with keys.how can I create an array like that telegram accept?



via mrmrn

Advertisement