OK, thanks to all for their help, I was confusing the row and column values. I've successfully re-written my code to pull out one column at a time and process each column separately. I still have a few things to work out, but I'm over the hump.
$row->[0] was the key.