Christopher Shennan’s Blog

A day in the life of…

Browsing Posts published in July, 2009

One simple thing I keep having to do over and over again is to display the name of the month for a given date.  Normally I have opted to use the first solution that comes to mind which is creating an array with all the month names in it and then when I want to retrieve the month name I just use

$monthName = $aMonth[$monthNum];

However, when I wanted to use PHP to display the month name this time I wanted to see if there was a better solution.

The one I came across was posted on The Code Cookbook and was a simple 1 line statement which was great… simpler, neater and far more elegant than my usual method and it looked like

$monthName = date("F", mktime(0, 0, 0, $monthNum, 10));

Normally I would have been happy with this, however was needing to deal with a month drop down box which didn’t run from January to December but instead ran from November to April but this worked out to be rather simple too.

continue reading…

Bookmark and Share

After about a year since the inital meeting regarding creating a website for the Dunscore Community Council, I can proudly announce that the website has now been successfully launched.

The project was initially to create a website focused around the Community Council  but during the last year it has expanded it’s scope to encompass the Village of Dunscore as a whole and provide a central point for information not only regarding council business, but local business, events and activities as well.

The website has been very well received by all involved within the project and I look forward to a bright and successful future.

Bookmark and Share