I want to show the following from a date, that is, I want it to tell me
Monday 2, Tuesday 31,
and so on, but I don't know how, the language is PHP right now I have this
ucfirst(strtolower(strftime("%B",
DateTime::createFromFormat('m', $fila['month'])->getTimestamp())))
And that converts the month to the name of the month, but I don't know how to do it with the day of the week,
I have this data
$fila['month']
$fila['year']
$fila['day']
Hello, you could do something like this:
For more details I suggest you review the documentation: StrToTime PHP
you could use two array's one for days and one for months.
PHP has several classes to work with dates that make things much easier for us, to go through a period of dates and display them, it can support you in
DateTime
and its methodsDateTime::modify
andDateTime::format
, as well as in the classesDatePeriod
andDateInterval
example explained
Result: