Uhm.. well basically usually you simply know it

the E36 was the 90's model, as mine (link in the picture), while the E46 is the present one... and before the E36 in the 3-Series there was the E30...
Now let's see if I can find a good site where all the models are listed with also their model indentification code...
Edit - this page could help:
http://www.bmwworld.com/models/cars.htm scroll a little down and you will see