Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check if date is bigger than today

<?php
 $date_now = new DateTime();
 $date2    = new DateTime("01/02/2016");

if ($date_now > $date2) {
    echo 'greater than';
}else{
    echo 'Less than';
}
Comment

php check if date is bigger than today

<?php
 $date_now = date("Y-m-d"); // this format is string comparable

if ($date_now > '2016-01-02') {
    echo 'greater than';
}else{
    echo 'Less than';
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel update and insert transaction 
Php :: php trim string to length 
Php :: wp wordpress logout 
Php :: how to run php file in xampp 
Php :: ubuntu set alternatives 
Php :: what is directory_separator in php 
Php :: pdo last id 
Php :: carbon two day ago 
Php :: php superglobal 
Php :: unable to locate package php8.1 ubuntu 
Php :: php compare two versions return true or false if version is big 
Php :: Add Product Short Description To Product Category In WooCommerce 
Php :: Array Contant PHP 
Php :: php __construct 
Php :: php shell script 
Php :: php sqrt 
Php :: sanitize_text_field 
Php :: update sql php 
Php :: php decode json file 
Php :: How to display image from aws s3 in laravel blade 
Php :: previous month number in php 
Php :: laravel limit relationship result 
Php :: add shortcode in short description 
Php :: php curl async callback 
Php :: [InvalidArgumentException] Package mongodb/mongodb has requirements incompatible with your PHP version , PHP extensions and Composer version: - mongodb/mongodb 1.12.0 requires ext-mongodb ^1.13.0 but it is not prese nt. 
Php :: count with left join in laravel 
Php :: count remaining days php 
Php :: laravel create search 
Php :: php create an image 
Php :: php microtime to seconds 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =