Código PHP:
public function jm_years(){
$years=$this->_getjm_years();
return $years;
}
private function _getjm_years(){
$years=$this->fun->Select("nacimientos","DISTINCT YEAR( `fechaNac` ) as anios","","ORDER BY anios DESC");
$arrayYears=$years->fetch_assoc();
return $arrayYears;
}
Código PHP:
$anios=$clase->jm_years();
foreach($anios as $year){echo $year;}