Created
July 16, 2013 01:57
-
-
Save facumartig/6005194 to your computer and use it in GitHub Desktop.
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 include './functions.php'; if(isset($_GET['source'])) { highlight_file(__FILE__); exit; } ?> | |
<tr> | |
<?php | |
for ($i = 1; $i <= 7; $i++){ | |
if ($i < $primer_dia){ | |
echo "<td><span></span></td>"; | |
} | |
else { | |
echo "<td>".$diap."</td>"; | |
$diap++; | |
} | |
} | |
echo "</tr><tr>"; | |
for ($i = 1; $i <= $days_number; $i++) { | |
echo "<td>".$diap."</td>"; | |
$diap++; | |
if ($i % 7 == 0){ | |
echo "</tr><tr>"; | |
} | |
} | |
// $primer_dia = dia de la semana en el que empieza el mes (1 lunes, 2 martes..) | |
// $diap = 1 (originalmente) | |
// $days_number = total de dias del mes (28 febrero, 31 enero..) | |
?> | |
</tr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment