Sivo 悉见

源代码

匿名 · 更新于 2017/2/8

public function test(){
        $amount = 0;
        $lilv = 0.08/12;
        $yuefen = 18*12;
        $meiyue = 2000;
        for($i = 1; $i <= $yuefen ; $i++){
            $lixi = $amount*$lilv;
            $amount = $amount+$lixi+$meiyue;
            $year = floor($i/12)?floor($i/12)."周岁":"";

            if($i%12 && floor($i/12)!=0){
                $mounth = "".($i%12)."个月";
            }else if($i%12 != 0 && floor($i/12) == 0){
                $mounth = ($i%12)."个月";
            }else{
                $mounth = "";

            }
//            if($i <= 10)
            $date=date_create("2016-05-22");
            date_add($date,date_interval_create_from_date_string("+".$i." month"));
//            echo '<h3>'.date_format($date,"Y-m-d").')第'.$year.$mounth.'【语晨成长储备金】为 <b style="color:red">¥ '.$amount.'</b></h3><br />';
        }


        //==============================
        $amount = 0;
        $yuefen = 60*12;
        $meiyue = 2000;
        for($i = 327; $i <= $yuefen ; $i++){
            $lixi = $amount*$lilv;
            $amount = $amount+$lixi+$meiyue;
            $year = floor($i/12)?floor($i/12)."周岁":"";

            if($i%12 && floor($i/12)!=0){
                $mounth = "".($i%12)."个月";
            }else if($i%12 != 0 && floor($i/12) == 0){
                $mounth = ($i%12)."个月";
            }else{
                $mounth = "";

            }
//            if($i <= 3)
            $date=date_create("1989-11-29");
            date_add($date,date_interval_create_from_date_string("+".$i." month"));
//            echo '<h3>'.date_format($date,"Y-m-d").')第'.$year.$mounth.'【乐乐养老储备金】为 <b style="color:red">¥ '.$amount.'</b></h3><br />';

        }


        //==============================
        $amount = 0;
        $yuefen = 60*12;
        $meiyue = 2000;
        for($i = 352; $i <= $yuefen ; $i++){
            $lixi = $amount*$lilv;
            $amount = $amount+$lixi+$meiyue;
            $year = floor($i/12)?floor($i/12)."周岁":"";

            if($i%12 && floor($i/12)!=0){
                $mounth = "".($i%12)."个月";
            }else if($i%12 != 0 && floor($i/12) == 0){
                $mounth = ($i%12)."个月";
            }else{
                $mounth = "";

            }
//          if($i <= 3)
            $date=date_create("1987-10-13");
            date_add($date,date_interval_create_from_date_string("+".$i." month"));
            echo '<h3>'.date_format($date,"Y-m-d").')第'.$year.$mounth.'【飞飞养老储备金】为 <b style="color:red">¥ '.$amount.'</b></h3><br />';
        }

    }