Lattice-Boltzmann simulations are used to examine the effects of fluid inertia, at moderate Reynolds numbers, on flows in simple cubic, face-centred cubic and random arrays of spheres. The drag force on the spheres, and hence the permeability of the arrays, is calculated as a function of the Reynolds number at solid volume fractions up to the close-packed limits of the arrays. At Reynolds numbers up to O(102), the non-dimensional drag force has a more complex dependence on the Reynolds number and the solid volume fraction than suggested by the well-known Ergun correlation, particularly at solid volume fractions smaller than those that can be achieved in physical experiments. However, good agreement is found between the simulations and Ergun's correlation at solid volume fractions approaching the close-packed limit. For ordered arrays, the drag force is further complicated by its dependence on the direction of the flow relative to the axes of the arrays, even though in the absence of fluid inertia the permeability is isotropic. Visualizations of the flows are used to help interpret the numerical results. For random arrays, the transition to unsteady flow and the effect of moderate Reynolds numbers on hydrodynamic dispersion are discussed.