Newbie: How to loop round sub-directories

I want a bit of shell script that will let me loop round all the sub-directories in a directory (i.e. ignoring any ordinary files in that directory). Let's say I just want to echo the names of the sub-directories. This sounds like it should be pretty easy - but not for me, it isn't!

All help gratefully received.

for dir in */
do
   : whatever with "$dir"
done

Another way:

for i in `find . -type d`; do
  echo $i
done

...which will fail if any directory names contain whitespace.

It will also go beyond the current directory and search within subdirectories.

Thanks People!

cfajohnson's solution is pretty much exactly what I want.

I'm sure tongelja's solution will come in handy some other time.

Thanks again to you both.