php绘制日历

<?php

$days=31;

echo "<table>";

for($i=1;$i<=$days;){

      echo "<tr>";

      for($j=0;$j<7;$j++){

            if($i>$days){

                   echo "<td>&nbsp;</td>";

            }else{

                   echo "<td>".$i."</td>";

            }

            $i++;

       }

       echo "</tr>";

}

echo "</table>";

?>

    A+
发布日期:2015年02月02日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: