最近比较忙~发段代码
$arr = array(0=>0, 1=>1, 2=>2);
echo json_encode($arr), "<br>";
$arr = array( '0'=>0, '1'=>1, '2'=>2);
echo json_encode($arr), "<br>";
$arr = array( 'l' => 0, 'i' => 1, 'k' => 2);
echo json_encode($arr), "<br>";
$arr = array(0 => 0, 2 => 2, 1=>1);
echo json_encode($arr), "<br>";