Sunday, April 16, 2017

how to create an array in foreach loop?

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