Skip to content

Instantly share code, notes, and snippets.

@prodeveloper
Created March 8, 2016 15:52
Show Gist options
  • Save prodeveloper/047c0c788e4620932caf to your computer and use it in GitHub Desktop.
Save prodeveloper/047c0c788e4620932caf to your computer and use it in GitHub Desktop.
Days and months example
<table border="1">
<!--Table headers -->
<tr>
<td>Months</td>
<td>Days</td>
<td>Last day</td>
</tr>
<?php
$row1 = ["January", 31 ];
$row2 = ["February", 29 ];
$rows = [$row1, $row2];
//Loop over all rows
foreach ($rows as $month) {
echo "<tr>";
echo "<td>{$month[0]}</td>";
echo "<td>{$month[1]}</td>";
echo "<td></td>";
echo "</tr>";
}
?>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment