Create Table Columns from an Array of Data using PHP

Recently I needed to take a list of URL’s from a database and present them in an HTML table.  I needed to split the list into an equal number of list items per column in the table.

The PHP script function below accepts a single array of items which could be URL’s, words, phrases, or some other text and a value for the number of columns your table should contain.


Author: Richard Soares

Director of Software Development & Senior Technical Project Manager