CodeIgniter PHP Two time-of-day comparison

Source: Internet
Author: User
Tags codeigniter
CodeIgniter PHP

Write a 20131010 date

And then in getting the system now time now if the time is 20131113

How to use CodeIgniter to get the current time of the system?



If 20131010 date and 20131113 compare


if () {
Alert (present date in 10 days)
}else if () {
Alert (the date is now over 10);
}

How to implement with PHP code?

To help the prawn.


Reply to discussion (solution)

Write a 20131010 date

And then in getting the system now time now if the time is 20131113

How to use CodeIgniter to get the current time of the system?



If 20131010 date and 20131113 compare


if () {
Alert (present date in 10 days)
}else if () {
Alert (the date is now over 10);
}

How to implement with PHP code?

To help the prawn.


---------------------------------------------
Yes, the time format is 2013-11-11 23:59:59 comparison


Write a 20131010 date

And then in getting the system now time now if the time is 20131113

How to use CodeIgniter to get the current time of the system?



If 20131010 date and 20131113 compare


if () {
Alert (present date in 10 days)
}else if () {
Alert (the date is now over 10);
}

How to implement with PHP code?

To help the prawn.


---------------------------------------------
Yes, the time format is 2013-11-11 23:59:59 comparison
-----------------------------------------------------------
You don't have to go to the current system time to compare two times

The CI frame takes the same time as you normally write code.

]
 
   $old) {echo "Time 10 days Ago";} Else{echo "time within 10 days";}? >
  • 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.