PHP Kod:
<?php
date_default_timezone_set('UTC');
$bugun = tr_gun(date('N', strtotime('now')));
echo "bugün, $bugun <br>";
for($i=1;$i<=7;$i++){
echo 'bugünden '.$i.' gün sonraki gün '.tr_gun(date('N', strtotime(' +'.$i.' day'))).'<br>';
}
function tr_gun($gun) {
switch ($gun) {
case '1':
return "Pazartesi";
break;
case '2':
return "Salı";
break;
case '3':
return "Çarşamba";
break;
case '4':
return "Perşembe";
break;
case '5':
return "Cuma";
break;
case '6':
return "Cumartesi";
break;
case '7':
return "Pazar";
break;
}
}
?>