can't get timer to reset at 0

Okay... I am almost embarrassed to have to ask this but, it's been awhile since i have fiddled with my arduino and programming in general

here is the relevant code, Basically I have a counter that counts up every second and when it hits 10, it is supposed to make the if statement true (which is does) and then reset at 0 (which it does not...)

hopefully I'm just doing a rookie mistake here

int timer;

//setup
void setup() {
  lcd.begin(16, 2);  
  Serial.begin(9600);
}

//main loop
void loop()
{
  timer = (millis()/1000);
  if (timer>10) {
    timer = 0;
    //do something else
  }
}
unsigned long timer;
unsigned long startTime = 0;

//setup
void setup() {
  lcd.begin(16, 2);  
  Serial.begin(9600);
}

//main loop
void loop()
{
  timer = ((millis() - startTime) /1000);
  if (timer>10) {
    startTime = millis();
    //do something else
  }
}

Thanks! ah that makes more sense hahaha

As you can see... I'm the not best at programming ):