this question has answer here:
- convert 1 date format in php 12 answers
is there way use datetime::createfromformat
convert 0-6 integer name of day of week?
i creating calendar script , let users customize way days of week display (mon vs monday) using array of week day names not desirable.
how can use createfromformat this?
hope understand question.
$day = 0; $date = datetime::createfromformat('j-m-y', $day . '-feb-2010'); echo $date->format('l');
would output :
sunday