<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Get month name</title>
	<link>http://phpit.net/code/get-month-name/</link>
	<description>PHPit has dozens of PHP articles, codesnippets and FAQ's.</description>
	<pubDate>Sun, 03 Aug 2008 19:16:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>

	<item>
		<title>by: Dennis Pallett</title>
		<link>http://phpit.net/code/get-month-name/#comment-419</link>
		<pubDate>Sun, 15 Jan 2006 22:02:01 +0000</pubDate>
		<guid>http://phpit.net/code/get-month-name/#comment-419</guid>
					<description>You are absolutely righ of course, and this snippet comes from my 'old days' as a newbie PHP programmer, when I hadn't heard of the date() function yet.

Thanks for the comment!</description>
		<content:encoded><![CDATA[<p>You are absolutely righ of course, and this snippet comes from my &#8216;old days&#8217; as a newbie PHP programmer, when I hadn&#8217;t heard of the date() function yet.</p>
<p>Thanks for the comment!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: BraveBrain</title>
		<link>http://phpit.net/code/get-month-name/#comment-364</link>
		<pubDate>Fri, 06 Jan 2006 14:24:02 +0000</pubDate>
		<guid>http://phpit.net/code/get-month-name/#comment-364</guid>
					<description>A shorter way (which returns the current month if no arguments are provided)

function getmonth($m=0) {
    return (($m==0 ) ? date("F") : date("F", mktime(0,0,0,$m)));
}

Examples (the first one; if posted today):
echo getmonth();
// January

echo getmonth(12);
// December

echo getmonth(14);
// February
(since the passed argument is above 12 it starts with January on 13, February on 14, etc etc)</description>
		<content:encoded><![CDATA[<p>A shorter way (which returns the current month if no arguments are provided)</p>
<p>function getmonth($m=0) {<br />
    return (($m==0 ) ? date(&#8221;F&#8221;) : date(&#8221;F&#8221;, mktime(0,0,0,$m)));<br />
}</p>
<p>Examples (the first one; if posted today):<br />
echo getmonth();<br />
// January</p>
<p>echo getmonth(12);<br />
// December</p>
<p>echo getmonth(14);<br />
// February<br />
(since the passed argument is above 12 it starts with January on 13, February on 14, etc etc)
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
