Array reference - bad substitution

I've created a series of arrays named as follows:

row1[]
row2[]
row3[]
.
.
.
row10[]

Each has 4 elements.

I'm trying to echo the array elements out in a for loop. Here's what I have:

for ((i=1;i<=10;i++))
do
  for ((j=1;j<=4;j++)) 
  do
    eval out=${row`echo $i`[$j]}
    echo -n $out
  done
  echo
done

I get the bad substitution error on the eval out= assignment. Oddly, just a few lines before that, almost the exact same syntax works fine for assigning the values to the arrays ( eval row`echo $i`[$j]=......)

Any help is much appreciated.

i=1
while [ $i -le 10 ]; do
  j=0
  while [ $j -le 4 ]; do
    eval "printf '%s\n' \"\${row$i[$j]}\""
    printf "%s" "$out"
    j=$(( $j + 1 ))
  done
  i=$(( $i + 1 ))
done

Simpler is:

i=1
while [ $i -le 10 ]; do
  eval "printf '%s\n' \"\${row$i[@]}\""
  i=$(( $i + 1 ))
done

Perhaps you can adapt this function to your needs:

## Usage: printarray arrayname
## Example: i=3; printarray row$1
printarray()
{
  eval "printf '%s\n' \"\${$1[@]}\""
}

That's almost got it. How would I get it to print a tab character between each row element?

Use \t instead of \n in the format string.