title: How to get row and column length of a 2-dimensional array in rails 3?
body: <p>can somebody tell how to get the row and column length of a 2-dimensional array in rails 3? </p>
  
  <p>My array goes like this:</p>
  
  <pre>
  <code>
   payroll = Array.new[Payroll.count][2]
  </code>
  </pre>
  
  <p>When we are getting the length of a 1-dimensional array we do like <pre> array.length </pre>
  How about in a 2-dimensional array?</p>
  
  <p>Im thinking of doing something like:</p>
  
  <pre>
  <code>
   payroll = Array.new[Payroll.count][2]
  
   for i in 0..payroll.row.length - 1
    for j in 0..1
     puts payroll[i][j]
    end
   end
  </code>
  </pre>
  
  <p>I just wanna know the right way. Pls help...</p>