Programmed on/off times for LED blink

The code below works and can blink two LEDs independently ...but appears too much code !! ANd if I want to extend this to more LEDs the code become large...Just wanted to know if there is a simpler method to achieve the same.

void setup()
{

}

void loop()
{
  ledPrgOffOn(800, 10, 2);

  ledPrgOffOn_01(500, 500, 3);
}

//$$$$$$$$$$$$$$$$$$$$$

// Function to blink an LED based on programmed On Times and Off times..

void ledPrgOffOn(long offPeriod, long onPeriod, byte ledPin )
{
  unsigned long currentMillis = millis();
  static unsigned long previousMillis = 0;
  static boolean ledState;
  static boolean onLED = 1;
  static boolean offLED = 0;

  if ( onLED )
  {
    if (currentMillis - previousMillis >= offPeriod)
    {
      ledState = HIGH;
      onLED = 0;
      offLED = 1;
      previousMillis = currentMillis;
    }
  }
  if ( offLED )
  {
    if (currentMillis - previousMillis >= onPeriod)
    {
      ledState = LOW;
      onLED = 1;
      offLED = 0;
      previousMillis = currentMillis;
    }
  }
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, ledState);     // Update the LED state
}

//$$$$$$$$$$$$$$$$$$$$

void ledPrgOffOn_01(long offPeriod, long onPeriod, byte ledPin )
{
  unsigned long currentMillis = millis();
  static unsigned long previousMillis = 0;
  static boolean ledState;
  static boolean onLED = 1;
  static boolean offLED = 0;

  if ( onLED )
  {
    if (currentMillis - previousMillis >= offPeriod)
    {
      ledState = HIGH;
      onLED = 0;
      offLED = 1;
      previousMillis = currentMillis;
    }
  }
  if ( offLED )
  {
    if (currentMillis - previousMillis >= onPeriod)
    {
      ledState = LOW;
      onLED = 1;
      offLED = 0;
      previousMillis = currentMillis;
    }
  }
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, ledState);     // Update the LED state
}

but appears too much code

That's only because it is.

Look at the differences between ledPrgOffOn_01() and ledPrgOffOn(). The only differences are the static variables.

You could use an array of static variables, pass the function an index, and have only one function. Easy to extend to 100 LEDs.