I have tested this and it works:
code:
break on
$RecCount=5
Dim $Array[$RecCount]

? ubound($Array)


$Index = 0

for $index=1 to 5
$Array[$Index] = $index
next

For each $item in $Array
? $item
next

_________________________
Home page: http://www.kixhelp.com/hb/