Advertisement
Guest User

365 day printable calender with PHP

a guest
Feb 25th, 2011
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <style type="text/css">
  4.             .day {
  5.                 float: left;
  6.                 width: 2.1em;
  7.                 height: 2.1em;
  8.                 display: inline-block;
  9.                 border: 1px black solid;
  10.                 padding: 2px;
  11.                 font-family: verdana;
  12.                 font-size: 1em;
  13.             }
  14.         </style>
  15.     </head>
  16.     <body>
  17.         <?php
  18.         $timestamp = mktime(0, 0, 0, 1, 1, date('o'));
  19.  
  20.         for ($i = 0; $i < 365; $i++) : ?>
  21. <div class="day">
  22. <?php echo date('M', $timestamp + ($i * 60 * 60 * 24)) . '<br />'; ?>
  23. <?php echo date('d', $timestamp + ($i * 60 * 60 * 24)); ?>
  24. </div>
  25.         <?php endfor; ?>
  26.     </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement