In pseudocode kind of:
for i = 0 to 8 do
array[i%3,floor(i/3)] = i+1
Something like that, off tip of my mind.
Actually, even simpler, in the for every element loop, just set the current value to x*y. If zero indexed... (x+1)*(y+1)
Is this you want? http://d.pr/i/OmoE
Develop games in your browser. Powerful, performant & highly capable.
Strange! The OP seems to have deleted his post, I was responding to him, I did not start this thread!
Tom, you may want to investigate this.
Haha sorry about that. I figured it out and tried to delete the topic, but instead it just deleted the OP. I'm assuming this happened because I deleted the topic after you posted, but before refreshing the page to see it.