When it comes to time, I believe everyone is familiar with it, because no matter we develop any project, there will basically be display time, creation time, modification time and acquisition time. Time is used as a good voucher for recording. , is also used as a sorting mark. The importance of time can be imagined. Today we will tell you how to get the implementation of the previous week, next week and last weekend in PHP~
First download our course The PHP needed to obtain the class library of last Monday, last Sunday, and next Monday: http://www.php.cn/xiazai/leiku/789
Download completed Then find the php class file we need, unzip it to our local directory, and create a new php file!
After completion, we need to call this class in the new php file and instantiate the class:
<?php include_once "codeshijian.php";//引入类文件 $obj = new Project_View_Helper_TaskNotice(); //实例化类 echo $obj->TaskNotice(); //输出结果 ?>
Run the file and the result will be as shown below:
The above is the detailed content of php gets the example sharing of last Monday, last Sunday and next Monday. For more information, please follow other related articles on the PHP Chinese website!