reading value of concatenation with ksh

hello all, I am trying to read the value of a concatenation, the following code is displaying
$word1
$word2
I want to display
village
home

Thanks

for (( i=1; i<=2; i++ ))
do

word1='village'
word2='home'

con="$"word"$i"
echo $con

done

word1='village'
word2='home'
echo "$word1 $word2"

If you want to deal with an array , use brackets []

I will be calling a function inside the loop "for" and I want to pass word"i" as a parameter so I need to make it work the way I displayed it in the code as con="$"word"$i"

Thanks

eval con=\$word$i

Thanks a lot.

for (( i=1; i<=2; i++ ))
do
word1='village'
word2='home'
con=word"$i" # Note that ther's no "$" in front
echo "$con = '${!con}'" # Note the ${!<VARIABLE>} to expand to the content of <VARIABLE>.
done