Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php season calculation

<?php
  $giorno = date('d');
  $mese = date('n');

  if (($mese <= 3 && $giorno < 21) || ($mese == 12 && $giorno >= 22)) {
    $stagione = "Winter";
  } elseif ($mese <= 6 && $giorno <= 20) {
    $stagione = "Spring";
  } elseif ($mese <= 9 && $giorno >= 22) {
    $stagione = "Summer";
  } else {
    $stagione = "Autumn";
  }
Comment

PREVIOUS NEXT
Code Example
Php :: laravel collection flip 
Php :: use middleware in controller to have access session 
Php :: php getgmail name 
Php :: run drush command from php 
Php :: custom middleware laravel 8 
Php :: laravel route group within a group 
Php :: letzten 3 zeichen aus einem string entfernen php 
Php :: laravel General error: 1215 Cannot add foreign key constraint" 
Php :: php registration form and login in same page 
Php :: laravel helper functions 
Php :: laravel validate string 
Php :: modal form with php 
Php :: ? in php 
Php :: product slider shortcode woocommerce 
Php :: php date format dd-mm-yyyy 
Php :: remove exact characters from string using php 
Php :: how to increment date in php 
Php :: crrate model in laravel 
Php :: Append a text string to WooCommerce product title loop 
Java :: basic hello world program in java 
Java :: how to check if player is in minecart using /execute 
Java :: java print stack trace to string 
Java :: disable buttonjava 
Java :: spigot how to create custom items 
Java :: android how to split string 
Java :: error: cannot find symbol@javax.annotation.Generated( 
Java :: how can I split string according to space in java? 
Java :: java random max and min 
Java :: print files in java 
Java :: java jcombobox itemlistener only if value changed 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =