This is Sample code Example of Array in Axapta .
str name;
Array Arr = new Array (Types::String);
int i= 1, j;
Int test;
TestTable TestTable;
;
// Create an Str array
// Write some elements in it
while select TestTable
{
Arr.value(i, TestTable.TestTables);//(i, i*2);
i++;
}
j = i;
for (i = 1; i<j; i++)
{
test= Arr.value(i);
while select TestTable where TestTable.TestTables == test
{
info(strfmt("%1", Arr.value(i)));
}
}