No sé por qué tiene que ser un "while" .. un foreach() te vendría bien
Sería algo así:
Código PHP:
foreach ($tu_array as $indice=>$row){
echo $row['id']." --> ".$row['username']."<br>";
}
Con un "while" .. lo anterior equivaldría a:
Código PHP:
while (list($indice, $row) = each($tu_array)) {
echo $row['id']." --> ".$row['username']."<br>";
}
Un saludo,