y porque no algo así : 
    
Código PHP:
Ver originalinclude("tu archivo conexion");
 
foreach ($id as $ids => $keyv)
    
{
    $stmt = $conexion->prepare('SELECT * FROM tabla WHERE Id =:id');
    $stmt -> bindValue(':id',$keyv);
    $stmt->execute();
    while($datos = $stmt->fetch())
    {
    $nombre[]= $datos["Nombre"];
    }  
    
}