b2k Posted February 8, 2008 Share Posted February 8, 2008 Hi, everybody see this codes echo (date("l")); echo (date("l",mktime(0,0,0,0,date("n"),date("j"),date( "Y")))); They should show the same, but for me they don't Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/ Share on other sites More sharing options...
amites Posted February 8, 2008 Share Posted February 8, 2008 what does it show for you? Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462107 Share on other sites More sharing options...
b2k Posted February 8, 2008 Author Share Posted February 8, 2008 what does it show for you? The first one show me Friday And the second one show me Sunday Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462118 Share on other sites More sharing options...
b2k Posted February 8, 2008 Author Share Posted February 8, 2008 help!! Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462135 Share on other sites More sharing options...
revraz Posted February 8, 2008 Share Posted February 8, 2008 OMG, it's been 10 mins and its not solved yet! Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462137 Share on other sites More sharing options...
b2k Posted February 8, 2008 Author Share Posted February 8, 2008 OMG, it's been 10 mins and its not solved yet! Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462140 Share on other sites More sharing options...
z0mb1 Posted February 8, 2008 Share Posted February 8, 2008 I'm not convinced that those two should show the same although this sort of thing makes my head hurt it depends upon what you mean by 1 1st day of the week 1st day of the month 1st day of the year not sure but I don't get the same from each either Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462165 Share on other sites More sharing options...
PFMaBiSmAd Posted February 9, 2008 Share Posted February 9, 2008 The mktime() is incorrect. The first 3 parameters are for time, the second 3 are for date. You have 4 zero's, then the date. Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462234 Share on other sites More sharing options...
b2k Posted February 9, 2008 Author Share Posted February 9, 2008 The mktime() is incorrect. The first 3 parameters are for time, the second 3 are for date. You have 4 zero's, then the date. I don't get it Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462237 Share on other sites More sharing options...
PFMaBiSmAd Posted February 9, 2008 Share Posted February 9, 2008 You probably need to read this - http://www.php.net/manual/en/function.mktime.php Link to comment https://forums.phpfreaks.com/topic/90125-problem-with-echo/#findComment-462241 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.