php - how to print the multidimensional array value -


this array value

 $value = array (       [0] => array (         [a] => -33.884667407851         [f] => 151.16123199463       )        [1] => array (         [a] => -33.876686661215         [f] => 151.20414733887       )        ) 

this array , want output

[ [-33.866139529765626,151.26079559326172],[-33.866139529765626,151.26903533935547] ]

this trick,

$your_array = array (   0 => array (     'a' => -33.884667407851,     'f' => 151.16123199463   ) ,   1 => array (     'a' => -33.876686661215,     'f' => 151.20414733887   )    );   $your_output = json_encode(array_map('array_values', $your_array)); 

output:

[[-33.884667407851,151.16123199463],[-33.876686661215,151.20414733887]] 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -