Simple naughts and crosses game (tic tac toe)

right Im try ing to make a tic tac toe game but how would you test for a winning line? would I use and array if so how or would I use one big nested if statement?