Örneğin ben günü 22 Ekim (Pazar, Pazartesi, ...). Bunu nasıl yapabilirim almak istiyor?
You can use the date
function.
I'm using strtotime
to get the timestamp to that day ; there are other solutions, like mktime
, for instance.
For instance, with the 'D' modifier, for the textual representation in three letters :
$timestamp = strtotime('2009-10-22');
$day = date('D', $timestamp);
var_dump($day);
Alırsınız:
string 'Thu' (length=3)
Ve tam metinsel gösterimi için 'l' değiştirici ile:
$day = date('l', $timestamp);
var_dump($day);
Alacağınız:
string 'Thursday' (length=8)
Ya da 'w' değiştirici, günün sayısına olsun (0 to 6, 0 being sunday, and 6 being saturday) için:
$day = date('w', $timestamp);
var_dump($day);
Sen elde edeceğiz:
string '4' (length=1)
Hope this helps :-)