yolop Posted December 7, 2008 Share Posted December 7, 2008 hi i do that $x='8,12,19,12,9,2009'; echo mktime($x); but this function return everyone diffrent result 1228632324 1228632325 1228632326 1228632327 .... help please Link to comment https://forums.phpfreaks.com/topic/135892-problem-with-mktime/ Share on other sites More sharing options...
JasonLewis Posted December 7, 2008 Share Posted December 7, 2008 Can you even pass in it like that? mktime() takes more than 1 parameter. Have you actually looked at mktime in the manual? Link to comment https://forums.phpfreaks.com/topic/135892-problem-with-mktime/#findComment-708409 Share on other sites More sharing options...
yolop Posted December 7, 2008 Author Share Posted December 7, 2008 Can you even pass in it like that? mktime() takes more than 1 parameter. Have you actually looked at mktime in the manual? sorry i didn't understand you i want to create time with mktime from $x that i select from SQL how i do this Link to comment https://forums.phpfreaks.com/topic/135892-problem-with-mktime/#findComment-708410 Share on other sites More sharing options...
JasonLewis Posted December 7, 2008 Share Posted December 7, 2008 Well, what about this: $x = '8,12,19,12,9,2009'; $z = explode(",", $x); echo mktime($z[0],$z[1],$z[2],$z[3],$z[4],$z[5]); Convert it to an array, so that you can pass in all 6 parameters to the mktime() function. Link to comment https://forums.phpfreaks.com/topic/135892-problem-with-mktime/#findComment-708419 Share on other sites More sharing options...
yolop Posted December 7, 2008 Author Share Posted December 7, 2008 thank Link to comment https://forums.phpfreaks.com/topic/135892-problem-with-mktime/#findComment-708430 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.