for sure I don't advice you to use just one.
you array code you posted would return 3 same values. $x+1 is $x+1 even if you do it million times...
the end of array can be checked with the return value or by array assingment.
ubound() gives the last element of array which somewhat means the amount of elements.
but if you have array of 24 and you know it's 24 it's lot easier to read only those 24 (like the script before with 8)

cheers,
_________________________
!

download KiXnet