function rullkategori() { if ( false === ($result2 = mysql_query("SELECT kategori FROM animal")) ){ die('Could not query: ' . mysql_error($con)); } if ( mysql_num_rows($result2) > 0 ){ while($row = mysql_fetch_assoc($result2)) { echo ""; } } }