- substr: documentation ( source)
- date: documentation ( source)
<?php
$date= date('md');
$cyfra = substr($date, 0,1);
if($cyfra == 0) $date = substr($date, 1,4);
if (321 <= $date) echo "prawda";
if((321 <= $date) && ($date < 622)) $style = "wiosna";
elseif($date >= 622 && $date < 923) $style = "lato";
elseif($date >= 923 && $date < 1222) $style = "jesien";
elseif(($date < 321) || ($date >= 1222)) $style = "zima";
echo $style;