<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Quinterox &#187; for</title>
	<atom:link href="http://www.quinterox.com/content/tag/for/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quinterox.com/content</link>
	<description>Cesar Quinteros</description>
	<lastBuildDate>Sun, 20 Jun 2010 04:51:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Loops</title>
		<link>http://www.quinterox.com/content/code/php-learn/loops/</link>
		<comments>http://www.quinterox.com/content/code/php-learn/loops/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 02:49:46 +0000</pubDate>
		<dc:creator>Cesar Quinteros</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[for]]></category>
		<category><![CDATA[loops]]></category>

		<guid isPermaLink="false">http://quinterox.com/code/?p=16</guid>
		<description><![CDATA[Examples of While, Do While, and For loops.]]></description>
			<content:encoded><![CDATA[<h3>While</h3>
<pre>&lt;?php
$count = 1;
while ($count &lt;= 12) {
        echo $count . "&lt;br /&gt;";
        $count++;
}
?&gt;</pre>
<p><br class="break" /></p>
<h3>Do while</h3>
<p>Similar to a while loop with the exception that the code block is executed before the loop repeats. Note how it does not keep executing after the code realizes $number is not greater than 100 and less than 200.</p>
<pre>&lt;?php
$number = 1;
do {
    echo $number . "&lt;br /&gt;";
    $number ++;
} while (($number &gt; 100) &amp;&amp; ($number &lt; 200));
?&gt;</pre>
<p><br class="break" /></p>
<h3>For (each)</h3>
<p>Like the While statement but without having to declare variables outside the loop. The For statement includes the variable which you are incrementing in one line of code.</p>
<pre>&lt;?php
for ($count = 1; $count &lt;= 12; $count++) {
     echo $count . "&lt;br /&gt;"
}
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.quinterox.com/content/code/php-learn/loops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
