Answers for "php check month from date"

PHP
5

php grab month from date

$month = date("m",strtotime($mydate));
Posted by: Guest on June-11-2020
0

how to get match date and month in php

date('m',strtotime('2018-06-30' )) == date('m');
Posted by: Guest on October-04-2020
0

php check new month

You can use date_parse to parse almost any date format into its components. For example:

$date = date_parse("2012-01-02");
var_dump($date);
Will output:

array(12) {
  ["year"]=>
  int(2012)
  ["month"]=>
  int(1)
  ["day"]=>
  int(2)
  ["hour"]=>
  bool(false)
Posted by: Guest on December-31-2021

Browse Popular Code Answers by Language