PHP Output Desk Calendar PHP implementation

Source: Internet
Author: User
PHP Output calendar PHP implementation Calendar effect
 DayOneTwoThreeFourFiveSixfor ($i =0; $i < $trnum; $i + +) {$tabstr. = "";      for ($k =0; $k <7; $k + +) {//Seven cells per line $tabidx = $i *7+ $k;//Get cell sequence number//if cell ordinal is less than the number of days of the first day of the month ($wk 1st) or greater (total number of months + $WK 1st) Write the date ($tabidx < $WK 1st or $tabidx > $mdays + $wk 1st-1) by filling in the blanks only;      $dayecho = "": $dayecho = $tabidx-$wk 1st+1; Highlight today's date//$dayecho = "$dayecho";      if ($dayecho = = $datenow) {$TODAYBG = "class=current";}      else{$TODAYBG = "";} $tabstr. = "
 
  
   $dayecho "; } $tabstr. = "";} $tabstr. = "";? >{date ("Y")} year 
   {date ("M")} month 
    
 

  
 

?

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.