I have an array that looks like this.
Array (
[1] => Array (
[1] => Array ([0] => 12)
[2] => Array ([0] => 23)
# up to 12.
# up to 31.
It runs from array 1 to 31 (for each possible day of the month), then inside that array 1-12 (which is each month).
I need to create a HTML table which looks like:
Date January February and so on... to December
2011-01-01 12 23
So, dates on the first column and top row is the months.
What’s the best way I can create this table?
Help is much appreciated.
The best way is to convert the array into a new array that contains all the dates (rows) and per each row it contains another array that consists of all the months (columns).
This format is much easier for display.
Exmaple:
Ups, no need to convert it! Let’s give that array a name:
$dates:I leave adding the headings on top up to you.