gple Posted February 1, 2010 Share Posted February 1, 2010 How do I find the next saturday from now using the date function? Quote Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/ Share on other sites More sharing options...
MatthewJ Posted February 1, 2010 Share Posted February 1, 2010 echo strtotime("next Saturday"), "\n"; Quote Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/#findComment-1005043 Share on other sites More sharing options...
Jezza Posted February 1, 2010 Share Posted February 1, 2010 In the above guy's PHP I think that will print out the timestamp, in order to use it with the date function you could do this. $timestamp=strtotime("next Saturday"); date("jS F Y",$timestamp); hope it helps Quote Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/#findComment-1005047 Share on other sites More sharing options...
jl5501 Posted February 1, 2010 Share Posted February 1, 2010 or in a more human readable form echo strftime("%d/%m/%Y",strtotime("next Saturday"))."\n"; Quote Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/#findComment-1005049 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.