while ( ($dumb, $guru) = ( ($sth->fetchrow)[0,4]) ) { #do something here....with $dumb and $guru... #maybe push [$dumb,$guru] to another array? #but that could be just another SQL query. }