|
PHP复制代码
$a = array ( 0 => array ( 'name' => 0, 'value' => 0.62, ), 1 => array ( 'name' => 1, 'value' => 1.23, ), 2 => array ( 'name' => 2, 'value' => 0.35, ), 3 => array ( 'name' => 3, 'value' => 0.8, ), 4 => array ( 'name' => 4, 'value' => 0.35, ), 5 => array ( 'name' => 5, 'value' => 1.37, ));$b = array ( 0 =>
array (
'name' => 0,
'value' => 1.15,
),
1 =>
array (
'name' => 1,
'value' => 1.16,
),
2 =>
array (
'name' => 2,
'value' => 1.03,
),
3 =>
array (
'name' => 3,
'value' => 1.72,
),
4 =>
array (
'name' => 4,
'value' => 1.31,
),
6 =>
array (
'name' => 6,
'value' => 0.93,
));
echo json_encode($a);
echo '<br><br>';
echo json_encode($b);
明显发现两个json有很大的不同 ,知道原因的还请说一下 .
复制代码
|
|