A samotné $zaznam['hlasy'] něco vypíše? Pokud ne, je třeba hledat chybu v SQL dotazu, resp. struktuře tabulky.