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
Post a Comment