3x3x3 led cube Arduino 328  code question

Pretty new to this but have gotten the cube up and running using the 3 NPN transisstor set up.'m using the arduino duemilanove 328. My question is when using POV how can I make a loop in a loop. Basically when your trying to light 9 led's at an angle but have to light one row at a time really fast to look like it's all three levels are on at once. I want this code to repeat a # of times then end and move on to other shapes or designs. any help at all would be great THanks Maybe this helps.

digitalWrite(7, HIGH);   // set the LED on
  digitalWrite(8, HIGH);   // set the LED on
  digitalWrite(9, HIGH);   // set the LED on
  digitalWrite(10, HIGH);   //  set the top row on
  delay(10);              // wait for a second
  digitalWrite(7, LOW);    // set the LED off
  digitalWrite(8, LOW);    // set the LED off
  digitalWrite(9, LOW);    // set the LED off
  digitalWrite(10, LOW);    // set the top row off
  delay(10);              // wait for a second
  digitalWrite(6, HIGH);   // set the LED on
  digitalWrite(5, HIGH);   // set the LED on
  digitalWrite(4, HIGH);   // set the LED on
  digitalWrite(11, HIGH);   //  set the middle row on
  delay(10);              // wait for a second
  digitalWrite(6, LOW);    // set the LED off
  digitalWrite(5, LOW);    // set the LED off
  digitalWrite(4, LOW);    // set the LED off
  digitalWrite(11, LOW);    // set the middle row off
  delay(10);              // wait for a second
  digitalWrite(3, HIGH);   // set the LED on
  digitalWrite(2, HIGH);   // set the LED on
  digitalWrite(1, HIGH);   // set the LED on
  digitalWrite(12, HIGH);   // set the bottom row on
  delay(10);              // wait for a second
  digitalWrite(3, LOW);    // set the LED off
  digitalWrite(2, LOW);    // set the LED off
  digitalWrite(1, LOW);    // set the LED off
  digitalWrite(12, LOW);    // set the bottom row ground off
  delay(10);              // wait for a second

Try a for loop

Ok that looks like it should work but i'm alittle confused on how to get it to work. So if you OR someone could give me an example code of lets say, Turn on a green led then off then turn on a red led and blink it for 10 times using the FOR loop, then stop that and turn on the green led again. A little code like that should let me understand exactly how to use it. Thanks

Got it working thanks SO much.