Hello,
I'm currently looking for a way to populate some html tables of varying lenghts and widths, pulling the data from arrays.
I want to achieve this with a function in order to make this as dynamic as possible.
example:
function build_table($data){ ... }
$data would be an array containing a varying number of sub-arrays, the first array would populate the first row (column headings) and each subsequent array would be the data for each column rather than each row.
Thus the table would be build as such:
row 1 = array1[1],array2[1],array3[1]...
row 2 = array1[2],array2[2],array3[2]...
row 3 = array1[3],array2[3],array3[3]...
In other words, I would like each specific key value from each array to be merged into new arrays that form the rows.
Let me know if this is clear enough...if so, does anyone have any ideas?
Thank you!