Iterating a replacement rule

So i have this :

T4 = Sort[c2 @@@ Flatten[Table[{gl, wl, x, t}, {gl, 60, 90, 1}, {wl, 25, 45, 1}] /. {x -> 0, t -> 4}, 1]][[1]]

I want to T4[x_] to give me a list that iterate x over 0 ,1 ,2 ,3,…,x ,also the table can probably be done without needing to flatten it.

Is this what your are looking for?

In[3]:= t4[xx_] := 
 Sort[c2 @@@ 
    Flatten[Table[{gl, wl, x, t}, {gl, 60, 90, 1}, {wl, 25, 45, 
        1}] /. {x -> xx, t -> 4}, 1]][[1]]

In[4]:= t4[0]

Out[4]= c2[60, 25, 0, 4]

Yes I tried it but I was getting protected tag error, probably from being in In[1000]:= range, restarted mathematica and it worked.