时间:2021-07-01 10:21:17 帮助过:31人阅读
$coord = array ( 0=>array ( "x" => "102.00001", "y" => "20.12321" ), 1=>array ( "x" => "300.22", "y" => "111.22" ), 2=>array ( "x" => "202.1121", "y" => "30.2122" ) ); $str = json_encode($coord); echo $str; //[{"x":"102.00001","y":"20.12321"},{"x":"300.22","y":"111.22"},{"x":"202.1121","y":"30.2122"}]