Increment and Decrement a variable and display it on an lcd help please

I need to increment and decrement a variable where I can see what I am setting it to on the LCD.

I was hoping to use pushbuttons to increase and decrease the variable and display its current value on an LCD.

I do not have any code for this yet as I am just unsure of where to go.

I do have code for the pushbutton as it is one of those buttons that is linked to a 16x2 LCD display

if (x < 200) 
{
   //Up
    state = 1;
  } 
else if (x < 400)
{
   //Down
    state = 2;
  } 
else if (x < 800)
{
    //Select
    state = 3;
  }

I want if up is pressed var = var + 1;
if down is pressed var = var - 1;
lcd.print(var);

something that accomplishes this as a loop until I press select to leave the function. I dunno where to start really.

Any guidance would be greatly appreciated.

You practically wrote exactly what you need at the end of your post. You don't need a loop, the loop function is already repeating. Why not try it and see what happens.