if ( $_GET['_value'] == 'moto' )
{
$array[] = array('1' => 'Yamaha');
$array[] = array('2' => 'Suzuki');
$array[] = array('3' => 'Triumph');
$array[] = array('4' => 'KTM');
$array[] = array('5' => 'Honda');
$array[] = array('6' => 'Harley Davidson');
$array[] = array('7' => 'Buell');
$array[] = array('8' => 'MV Agusta');
$array[] = array('9' => 'Ducati');
$array[] = array('10' => 'Other');
}
$array = sort($array);
echo json_encode( $array );
那是我拥有的代码,它被一个链接的下拉列表拉出来。我希望它返回按字母顺序排序的值,但根据您看到的代码,它返回一个空数组。我犯的错误是什么/