17 марта - 1 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of 17 марта - 1.php
- <?php
- $today = date("j.m");
- //$today = '10.05';
- $week = date("D");
- //Праздники.Строго с точкой через запятую и пробел!
- $holidays = explode(', ', '1.01, 2.01, 3.03, 7.01, 23.02, 8.03, 1.05, 9.05, 12.06, 4.11');
- //Допол.выходные 2021.Строго с точкой через запятую пробел!
- $offdays = explode(', ', '4.01, 5.01, 6.03, 22.02, 3.05, 10.05, 9.05, 14.06, 31.11');
- //Рабочие СБ и ВС 2021.Строго с точкой через запятую пробел!
- $blackdays = explode(', ', '20.02');
- if(in_array($today,$holidays)||in_array($today,$offdays))
- {echo "Праздник или доп. вых";}
- elseif (in_array($today,$blackdays))
- {echo "Доп. раб. день";}
- elseif($week=="Sat"||$week=="Sun")
- {echo "Выходной $week $today";}
- else
- {echo "Рабочий день $week $today";}
- ?>
File Description
- 17 марта - 1
- PHP Code
- 17 Mar-2021
- 918 Bytes
You can Share it:
Latest PHP Pastes