xionhack Posted April 20, 2010 Share Posted April 20, 2010 Hello. I want to generate the initial of the day of all the days of a chosen month. Meaning, if I choose this month it will give me: TFSSMTWTFSSMTWTFSSMTWTFSSMTWTF Is that clear? Can anybody help me? thanks! Link to comment https://forums.phpfreaks.com/topic/199167-generate-days-of-the-month/ Share on other sites More sharing options...
NTSmarkv Posted April 20, 2010 Share Posted April 20, 2010 Go from here: <?php function week_of_year($day) { //Get date supplied Timestamp; $thisdate = mktime($day); if (date("D", mktime(1)) == "Mon"){ echo "M"; } $thisdate = mktime($day); if (date("D", mktime(1)) == "Tues"){ echo "T"; } Link to comment https://forums.phpfreaks.com/topic/199167-generate-days-of-the-month/#findComment-1045333 Share on other sites More sharing options...
xionhack Posted April 20, 2010 Author Share Posted April 20, 2010 Thank you for your reply NTSmarkv. The problem is that I just want to supply the month and the year, and for it to generate every day of the month. Link to comment https://forums.phpfreaks.com/topic/199167-generate-days-of-the-month/#findComment-1045338 Share on other sites More sharing options...
NTSmarkv Posted April 20, 2010 Share Posted April 20, 2010 work above code it should echo out MT... just keep adding or change to array.. Link to comment https://forums.phpfreaks.com/topic/199167-generate-days-of-the-month/#findComment-1045339 Share on other sites More sharing options...
xionhack Posted April 20, 2010 Author Share Posted April 20, 2010 I'm working on it, but honestly I dont find the way how to make it work. Can you help me a little bit more? sorry for the inconvenience Link to comment https://forums.phpfreaks.com/topic/199167-generate-days-of-the-month/#findComment-1045341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.