Stops adding values to array if number of columns is reached.