help with shell program

I want to print the value of variables a1, a2, a3 in for loop in the following program:

a1=this
a2=is
a3=printed

for((i=1;i<4;i++))
do
var=a$i
#w=`echo $var`
e=${var}
echo $e
done

But actually I get a1,a2,a3 as the output not the "this is printed"

So the main question is if I have a variable name(say p1) in another variable(in Q) how will I print the value of p1 from Q?

Thanks,

You'll need to play around with eval or similar to expand what you are trying to do, I'm guessing here, but something like "eval \$a$i"

eval var=\$a$i

Thanks for your help !