[ create a new paste ] login | about

Link: http://codepad.org/7dMiIcKe    [ raw code | output | fork ]

PHP, pasted on Jul 18:
<pre>
<?php
$p1=strtotime("2013-12-13");
echo "\n";
$p2=strtotime("2014-02-20");
echo "\n";
$h1a=strtotime("2014-02-21");
echo "\n";
$h1b=strtotime("2014-04-31");
echo "\n";
$l1=strtotime("2013-05-01");
echo "\n";
$l2=strtotime("2013-10-31");
echo "\n";
$h2a=strtotime("2013-11-01");
echo "\n";
$h2b=strtotime("2013-12-19");
echo "\n";
$today=strtotime(date("Y-m-d"));

if($today >= $p1 && $today <= $p2){
    echo "peak";
}elseif($today >= $h1a && $today <= $h1b){
    echo "hi1";
}elseif($today >= $l1 && $today <= $l2){
    echo "low";
}elseif($today >= $h2a && $today <= $h2b){
    echo "h2";
}
?>


Output:
1
2
3
4
5
6
7
8
9
10
<pre>








low


Create a new paste based on this one


Comments: