my $options = ''; while (my @ary = $sth->fetchrow_array()) { # $ary[0] holds the data's id # $ary[1] holds the data $options .= qq~