- $rows = ceil( count( $themes ) / 3 );
- $table = array();
- $theme_keys = array_keys( $themes );
- for ( $row = 1; $row <= $rows; $row++ )
- for ( $col = 1; $col <= 3; $col++ )
- $table[$row][$col] = array_shift( $theme_keys );
-
- foreach ( $table as $row => $cols ) {
- echo "\t<tr>\n";
- foreach ( $cols as $col => $theme_index ) {