For future reference,
First, the query to get userid must return a flat array, not a nested one. You must use qa_db_read_all_values(qa_db_query_sub()). In the future 1.9 version, the core developers may change this.
To list the items, you can use this to list the first 3 values, the rest can be expressed as "and # others",
list($first, $second, $third) = $userids;
echo $first. ' '. $second.' '.$third. 'have answered this question';
That's why you need a flat array, not nested.
To return the username, use this Q2A function, which is missing from official DOCS.
Similarly, to display avatars, you do MySQL queries, or exploit the Q2A functions to return avatars from $handle (ie, username).