Created
March 31, 2018 23:55
-
-
Save andimariadi/99e7d618f55a7449e1d1d322b5c8d980 to your computer and use it in GitHub Desktop.
Script coding table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$d = date('d'); | |
if ($d <= 9) { | |
$d = str_replace('0', '', $d); | |
} | |
$date = new DateTime('now'); | |
$dd = $date->modify('last day of this month'); | |
$last = $dd->format('d'); | |
echo '<table border="1">'; | |
echo '<tr>'; | |
for ($a=$d,$i = 1; $i <= 15; $a++,$i++) { | |
if ($a > $last) { | |
$a = 1; | |
$month = date('d-m-Y', strtotime('+1 month')); | |
} else { | |
$month = date('d-m-Y'); | |
} | |
echo '<td>' . $a; | |
echo '<tr>'; | |
for ($z=0; $z < 24; $z++) { | |
echo '<td>' . $z . '</td>'; | |
} | |
echo '</tr></td>'; | |
} | |
echo '</tr>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment