<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[PHP Forums - [Tutorial] How to find if a number is odd or even]]></title>
		<link>http://phpforums.org/topic13-tutorial-how-to-find-if-a-number-is-odd-or-even.html</link>
		<description><![CDATA[The most recent posts in [Tutorial] How to find if a number is odd or even.]]></description>
		<lastBuildDate>Thu, 08 Oct 2009 23:27:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[Tutorial] How to find if a number is odd or even]]></title>
			<link>http://phpforums.org/post24.html#p24</link>
			<description><![CDATA[<p>Hi there!</p><p>In this tutorial I&#039;ll write some basic PHP code on how to find if a number is odd or even.</p><p>The idea behind the code is that even numbers have zero reminder when divided by 2, while odd numbers have 1 as a reminder after division by 2. For this I&#039;ll use PHP modulus operator (%).</p><div class="codebox"><pre><code>&lt;?php
if ($number % 2 == 0)
{
    echo &quot;even&quot;;
}
else
{
    echo &quot;odd&quot;;
}
?&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Einherjar)]]></author>
			<pubDate>Thu, 08 Oct 2009 23:27:10 +0000</pubDate>
			<guid>http://phpforums.org/post24.html#p24</guid>
		</item>
	</channel>
</rss>

