split and making an array inside another array

I want to run an awk split on a value that has been pushed through an array and I was wondering what the syntax should be??

e.g. running time strings through an array and trying to examine just minutes:

12:25:30
10:15:13
08:55:23

awk '                    
      NR==FNR{
             a[NR]=$0
             next
             }
             {
              for(i=1;i<NR;i++)
split($0,a,":"); print a[2]
}'

I guess I'm wondering how to format for the subsection?? (a[i])[2] ???

:confused:

edit also will this substring from the split come out of the slit function as a number? e.g. can I do math on it or will it be a 'word'? If its a word can I make it a number?

try this: setting a field separator.

awk -F: '{ a[FNR]=$1; b[FNR]=$2; c[FNR]=$3 }
            END{
            for(i in a) { hour+=a}
            for(i in b) { min+=b}
            for(i in c) { sec+=c}
            printf "hours=%d min=%d sec=%d\", hour, min,sec)
            } ' inputfile

And yes, you can perform arithmetic as you see above.

What exactly you want to do with the minutes?

% print '12:25:30
10:15:13
08:55:23'|awk 'END{for(m in _){split(m, t, ":");print t[2]+1}}{_[$0]}'
56
26
16

Or just:

% print '12:25:30
10:15:13
08:55:23'|awk -F: '$0=$2+1'
26
16
56

Awk does not support multidimensional arrays, you can simulate them.