foreach ($ary_rank_data as $key => $value) { $ary_data[$key]['index'] = (string)($key + 1); } 备注:导出的数据是数字的,强制转换成字符串