Need help with a keypad door opener and LCD

I am a beginner with arduino. Sorry for my bad English I am from Brazil. I am building a keypad door opener with LCD to show the keys, but I am running into a problem, when the fourth key is pressed I get a strange symbol on the 5th position of the LCD. It Works ok until the third key.

I am looking for help and also other advices on improving the code.

Thanks in advance:

This could use some rearranging. You want to see the key pressed, store it then update the counter.

inputArray = key; //store entry into array i++; Serial.println(key); //print keypad character entry to serial port[/quote]