I can't for the life of me imagine what you are trying to do here.
HOWEVER to answer the question you have asked ('any suggestions')
My suggestion is that you use the array you have created in this statement:
for($i=1;$i<=mysql_num_rows($sqla);$i++) { $sql[$i] = @mysql...
That array is much simpler to manage than a bunch of hardcoded variables would be.
Later you can access the array
for($i=1;$i<$somevar;$i++) {//... some code with $sql[$i]}
instead of
for($i=1;$i<$somevar;$i++) {
SWITCH $i {
case 1:
//... some code with $sql1;
break;
case 2:
//... some code with $sql2;
break;
case 3:
//... some code with $sql3;
break;}
}
etc.
}}