you are writing overtop of the same variable $userlist again and again
to append the item to an array you say $var_name[] <--- the empty brackets do the trick
while($rowuser=mysql_fetch_array($query_user)){
$userlist=array('uid'=>$rowuser[0],'username'=>$rowuser[1]);
}
i think you want more like:
$userlist = array()
while($rowuser=mysql_fetch_array($query_user)){
$userlist[]=array('uid'=>$rowuser[0],'username'=>$rowuser[1]);
}