<?php



defined('BASEPATH') OR exit('No direct script access allowed');







class Tes extends CI_Controller {



	



    public function __construct(){



        parent::__construct();		



        $this->load->model('M_user');



    }



	public function (){



        $begin = new DateTime( "2021-01-13" );



        $end   = new DateTime( "2021-02-01" );



        $a = -1;



        $u =array();



        for($i = $begin; $i <= $end; $i->modify('+1 day')){



            $a++;



            $u[$a] = $i->format("Y-m-d");



        }



        // echo json_encode($u);



        // var_dump($u[0]);



        if(array_search('2021-02-01', $u) == false){



            echo json_encode(false);   



        }else{



            echo json_encode(true);



        }



    }



}



