We apply a stellar population synthesis code to the spectra of a large sample of SDSS galaxies to classify these according to their activity (using emission-line diagnostic diagrams), environment (using catalogues of isolated and cluster galaxies), and using parameters that correlate with their morphology.