日期:2014-05-16 浏览次数:20506 次
$str = '001_002_003_004_005_006_007'; $data = explode('_',$str); krsort($data); $total = count($data); $need = $total - 3; foreach($data as $k=>$row){ if($k<$need){ echo $row.'<br>'; } }