From: William James Date: 2006-03-17T04:13:47+09:00 Subject: Re: build 3x3 table from one array Pistos Christou wrote: > forest wrote: > > I am stuck trying to figure out how to take an array of data and > > dynamically build a 3x3 html table from it without standard for loops. > > > > Here is the code in JavaScript: > *snip* > > Can someone point me in the right direction for how to do this. I found > > each_index but still was at a loss. puts %w(1 2 3 4 5 6 7 8 9).map{|x| "" + x + "" }. join.gsub(/(){3}/,"\n \\&\n\n")