国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

???? ??? ?? ?? tr ? td? ???? PHP ??

113.png

??? ??? ???? ???? ??? ???? tr? td? ?????

 1) ???? ??? ??? ???? ????? ? tr ??? td? ??? ????? ???

 2) $index % 7 = = 0 ??? ? ?? ? ?? ?? ?????

 3)$index % 7 == 6 || $index == ($length-1) ? ?? ??? ?? ?????. $caculate

 4 )? ?? ??? $tr? ?? ?? ?????

<?php
function draw($caculate) {  //$caculate 通過caculate方法計算后的數(shù)據(jù)
      $tr = array();
      $length = count($caculate);
      $result = array();
      foreach ($caculate as $index => $date) {
         if($index % 7 == 0) {//第一列
            $tr = array($date);
         }elseif($index % 7 == 6 || $index == ($length-1)) {
            array_push($tr, $date);
            array_push($result, $tr);//添加到返回的數(shù)據(jù)中
            $tr = array();//清空數(shù)組列表
         }else {
            array_push($tr, $date);
         }
      }
      return $result;
   }

?>


???? ??
||
<?php function draw($caculate) { //$caculate 通過caculate方法計算后的數(shù)據(jù) $tr = array(); $length = count($caculate); $result = array(); foreach ($caculate as $index => $date) { if($index % 7 == 0) {//第一列 $tr = array($date); }elseif($index % 7 == 6 || $index == ($length-1)) { array_push($tr, $date); array_push($result, $tr);//添加到返回的數(shù)據(jù)中 $tr = array();//清空數(shù)組列表 }else { array_push($tr, $date); } } return $result; } ?>