while ($a = mysql_fetch_array($cat)) { for($i=0;$i\r\n"; echo "\t" . $a[navn] . "\r\n"; if (($i + 1) % 3 == 0) echo "\r\n"; } }