leachus2002 Posted February 3, 2011 Share Posted February 3, 2011 Hi There, I would like to place the last for month names into an variable- for example: February 2011 January 2011 December 2010 November 2010 But I would like them to all have the same variable ($date) - so when I use it in a mssql_fetch_assoc - it increments with every instance of $date, as there will be one instance of $date for every row returned, getting older with every row. Hope that is enough info? Cheers Matt Quote Link to comment https://forums.phpfreaks.com/topic/226560-placing-last-4-month-names-into-a-variable/ Share on other sites More sharing options...
cyberRobot Posted February 3, 2011 Share Posted February 3, 2011 I'm not sure what the question is, but can use the mktime() and date() functions to get the last four months. http://php.net/manual/en/function.mktime.php http://us2.php.net/manual/en/function.date.php Quote Link to comment https://forums.phpfreaks.com/topic/226560-placing-last-4-month-names-into-a-variable/#findComment-1169374 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.