Finish Table Columns With Number Divisibility Function
Well I'm working on a script where you must complete the table to look right or I might be missing a TD which I can't have, so I had this problem where I only had 9 results in the db and I needed to know how many more I needed to add(columns) to complete a four column table.
1 2 3 4
5 6 7 8
9 | | |
the |'s didn't display since I didn't know how to get the extra td's and came up with this function.
And yes I was doing that but in a different/shorter way
I had a table with 4 columns and I had 9 results that had to fit in the table, SO I made this function to tell me how many columns are needed to make a complete 4 by # without leaving off a couple columns to make my table not be incomplete.
And my function is shorter then using that code multiple times(repeated code) since I need this function 3 times in a class I'm creating for different table column sizes: