Help With simultaneous reduction/increment of LED's

I have Connect 2 LEDs to Arduino on separate PWM pins and gradually reduce the brightness
(brightness from 255 to 0) on red LED and gradually increase the
brightness (brightness from 0 to 255) on the green LED at the same
time.But all I can see that only the blue one blinking.The red one is not.How can I blink them at the same time but still keep that condition of simultaneous reduction/increment of brightness?Here’s my program:
int ledPin1 = 9; // LED connected to pin 9
int ledPin2 = 6; // LED connected to pin 6
void setup() {
pinMode(ledPin1,OUTPUT);
pinMode(ledPin2,OUTPUT);
}
void loop() {

// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin1, fadeValue);
delay(100);
// wait for 100 milliseconds to see the dimming effect
// fade in from min to max in increments of 5 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin2, fadeValue);
delay(100);
// wait for 100 milliseconds to see the dimming effect

}
}
}

You don't nest the for loops. You do this:

int ledPin1 = 9; // LED connected to pin 9
int ledPin2 = 6; // LED connected to pin 6
void setup() {
  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
}
void loop() {

  for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {
    // fade out from max to min in increments of 5 points:
    analogWrite(ledPin1, fadeValue);
    // fade in from min to max in increments of 5 points:
    analogWrite(ledPin2, 255 - fadeValue);
    delay(100);
  }
}

Thanks a lot!! :smiley: