I want to print in an html table the Seasons,the Months,and the days of each month.
the following code prints the seasons and the days
i need another foreach in between that prints the months also
Any ideas???
Please help...
$seasons=array (
"Fall"=> array ("September"=>"30","October"=>"31","November"=>"30"),
"Winter"=> array ("December"=>"31","January"=>"31","February"=>"28"),
"Spring"=> array ("March"=>"31","April"=>"30","May"=>"31"),
"Summer"=> array ("June"=>"30","July"=>"31","August"=>"31")
);
$tab = "<table border=\"1\">";
foreach($seasons as $season => $months) {
$tab .= "<tr><td colspan=\"4\">$season</td></tr>" ;
$tab .= "<tr>" ;
foreach($seasons[$season] as $days) {
$tab .= "<td>$days</td>" ;
}
$tab .= "</tr>" ;
}
$tab .= "</table>" ;
echo $tab ;