Fade Up LED then Hold via Conditional

I can fade the LED up, but I don’t know how to hold that color once the conditional statement it true:

int PWMpin = 10; // LED in series with 470 ohm resistor on pin 10
#define COMMON_ANODE
void setup()
{
  
}

void loop()
{
   
//conditional statement based on temperature
if (temperature >=50){

for (int i=0; i <= 255; i++){
      analogWrite(PWMpin, i);
      delay(10);
     //NEED TO BREAK THE FOR LOOP BUT HAVE LED STAY 255 BRIGHTNESS ONCE REACHED?
   } 
   
}

}

Woops just realized I posted in wrong category. I could hear a pin drop.....

Just get rid of the = for 255. It will exit the for loop once i reaches 255.