This is probably one of the most classic of Ajax use cases and there are tons for examples all over the web. Do a search for "dependent dropdowns" or "cascading dropdowns" and
you should find a lot of examples.
P.S. Properly written, any Ajax code to do this (or anything else for that matter) should be completely independent of what's being used on the server (php vs. JSP, for example).
[ August 28, 2007: Message edited by: Bear Bibeault ]