simple test, add this line:
? $c ' ' $r ' ' vartype($aResults) ' ' vartype($aResults[$c, $r])

right before:
$UserDetails = $UserDetails + "," + $aResults[$c, $r]

and when it bogs out, post the last output line on the console.
_________________________
!

download KiXnet