Welcome to CodeCoruses.eu

welcome.jpg

English | Norwegian

Coding Fora logo
  • main_navigation_menu_icon.png
  • Search
  • ic_more_vert.png

PHP find out which quarter we are in

You are here
Fora > PHP find out which quarter we are in

1_180303121314.jpg
Administrator

vote_up

0

vote_down

Posted by Administrator · 25 September 2018 (16405 days ago) · Report · Email

$month = date("m");
if($month == "01" OR $month == "02" OR $month == "03"){
$quarter = 1;
}
elseif($month == "04" OR $month == "05" OR $month == "06"){
$quarter = 2;
}
elseif($month == "07" OR $month == "08" OR $month == "09"){
$quarter = 3;
}
elseif($month == "10" OR $month == "11" OR $month == "12"){
$quarter = 4;
}

Reply

Social Media

youtube.png