<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[PHP Forums - [Tutorial] How to generate a random number in PHP]]></title>
		<link>http://phpforums.org/topic12-tutorial-how-to-generate-a-random-number-in-php.html</link>
		<description><![CDATA[The most recent posts in [Tutorial] How to generate a random number in PHP.]]></description>
		<lastBuildDate>Thu, 08 Oct 2009 21:29:49 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[Tutorial] How to generate a random number in PHP]]></title>
			<link>http://phpforums.org/post23.html#p23</link>
			<description><![CDATA[<p>Hello!</p><p>Here is some basic tutorial on how to generate a random number in PHP.</p><p>Random numbers in PHP are generated using the rand() function. Let&#039;s write some code that will generate a random number between 1 and 10.</p><div class="codebox"><pre><code>&lt;?php
echo rand(1, 10);
?&gt;</code></pre></div><p>If you need more than one random number generated, use rand() function in a loop. Here is a code for generating three random numbers between 10 and 20.</p><div class="codebox"><pre><code>&lt;?php
for ($i = 0; $i &lt; 3; $i++)
{
    echo rand(10, 20) . &quot; &quot;;
}
?&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Einherjar)]]></author>
			<pubDate>Thu, 08 Oct 2009 21:29:49 +0000</pubDate>
			<guid>http://phpforums.org/post23.html#p23</guid>
		</item>
	</channel>
</rss>
