<?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>Web Design company - Goweb99 blog &#187; php if-else</title>
	<atom:link href="http://www.goweb99.com/blog/tag/php-if-else/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goweb99.com/blog</link>
	<description>Get your website designed for as low as $99.</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP If Condition</title>
		<link>http://www.goweb99.com/blog/php-tutorial/php-if-condition/</link>
		<comments>http://www.goweb99.com/blog/php-tutorial/php-if-condition/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 10:47:58 +0000</pubDate>
		<dc:creator>tutor</dc:creator>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php elseif]]></category>
		<category><![CDATA[php if-else]]></category>
		<category><![CDATA[php switch]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[PHP Tuts]]></category>

		<guid isPermaLink="false">http://www.goweb99.com/blog/?p=450</guid>
		<description><![CDATA[The If Statement
This statement executes a piece of code only when a condition is true.
Syntax
 if (condition) code to be executed if condition is true;

For eg:
&#60;html&#62;
&#60;body&#62;
&#60;?php
$d=date(&#8221;D&#8221;);
if ($d==&#8221;Fri&#8221;) echo &#8220;Today is Friday!&#8221;;
?&#62;
&#60;/body&#62;
&#60;/html&#62;

The if&#8230;else Statement
This is a two way condition evaluation, in which there are yes and no both lead to different code block.
We just add one [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The If Statement</strong></p>
<p>This statement executes a piece of code only when a condition is true.</p>
<p>Syntax</p>
<ul> if (condition) code to be executed if condition is true;</ul>
<ul>
<div class="example">For eg:</p>
<p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$d=date(&#8221;D&#8221;);<br />
if ($d==&#8221;Fri&#8221;) echo &#8220;Today is Friday!&#8221;;<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></div>
</ul>
<p><strong>The if&#8230;else Statement</strong></p>
<p>This is a two way condition evaluation, in which there are yes and no both lead to different code block.</p>
<p>We just add one else condition in the above if statement.</p>
<p>Syntax</p>
<ul> if (condition)<br />
code to be executed if condition is true;<br />
else<br />
code to be executed if condition is false;</ul>
<ul>
<div class="example">For eg:</p>
<p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$d=date(&#8221;D&#8221;);          if ($d==&#8221;Fri&#8221;)<br />
echo &#8220;Today is Friday!&#8221;;         else<br />
echo &#8220;Today is not Friday!&#8221;;<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></div>
</ul>
<p>If more than one line should be executed, then the lines should be enclosed within curly braces:</p>
<ul>
<div class="example">&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$d=date(&#8221;D&#8221;);<br />
if ($d==&#8221;Fri&#8221;)<br />
{<br />
echo &#8220;Hello!&lt;br /&gt;&#8221;;<br />
echo &#8220;Today is Friday!&#8221;;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</div>
</ul>
<p><strong>The if&#8230;elseif&#8230;.else Statement</strong></p>
<p>This construct is used when there are more conditions than just true or false.</p>
<p>When PHP evaluates If&#8230;elseif&#8230;else statement it first sees if the If statement is true. If that test comes out to be false it then checks the first elseif statement.</p>
<p>If then also the result comes out to be false it will check the next elseif statement, if there exists any more otherwise, it will evaluate the else segment, if one exists.</p>
<p>Syntax</p>
<ul> if (condition)<br />
code to be executed if condition is true;<br />
elseif (condition)<br />
code to be executed if condition is true;<br />
else<br />
code to be executed if condition is false;</ul>
<ul>
<div class="example">
For eg:</p>
<p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$d=date(&#8221;D&#8221;);        if ($d==&#8221;Fri&#8221;)<br />
echo &#8220;Today is Friday!&#8221;;        elseif ($d==&#8221;Sun&#8221;)<br />
echo &#8220;Today is Sunday!&#8221;;        else<br />
echo &#8220;Today is neither Friday nor Sunday!&#8221;;<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></div>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.goweb99.com/blog/php-tutorial/php-if-condition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conditional Statements</title>
		<link>http://www.goweb99.com/blog/php-tutorial/conditional-statements/</link>
		<comments>http://www.goweb99.com/blog/php-tutorial/conditional-statements/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 10:08:36 +0000</pubDate>
		<dc:creator>tutor</dc:creator>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[if statement]]></category>
		<category><![CDATA[if...else]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php if-else]]></category>
		<category><![CDATA[php switch]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[PHP Tuts]]></category>
		<category><![CDATA[switch case]]></category>
		<category><![CDATA[switch statement]]></category>

		<guid isPermaLink="false">http://www.goweb99.com/blog/?p=440</guid>
		<description><![CDATA[Conditional statements are used to evaluate some conditions and perform different actions based on the outcome.
You can use conditional statements in your code to do this.
PHP provides the following conditional statements:

If statement &#8211; execute the piece of code only if a specified condition is true.
if (condition) code to be executed if condition is true;


If&#8230;else statement [...]]]></description>
			<content:encoded><![CDATA[<p>Conditional statements are used to evaluate some conditions and perform different actions based on the outcome.</p>
<p>You can use conditional statements in your code to do this.</p>
<p>PHP provides the following conditional statements:</p>
<ul>
<li>If statement &#8211; execute the piece of code only if a specified condition is true.
<p><span style="color: #808080;">if (condition) code to be executed if condition is true;</span></li>
</ul>
<ul>
<li>If&#8230;else statement – this statement executes a two way condition, where the true part does something else and the false part executes something else.
<p><span style="color: #808080;">if (condition)<br />
code to be executed if condition is true;<br />
else<br />
code to be executed if condition is false;</span></li>
</ul>
<ul>
<li>If&#8230;elseif&#8230;.else statement – if there are multi-way condition, where there are several blocks of code to be executed based on different conditions.
<p><span style="color: #808080;">if (condition)<br />
code to be executed if condition is true;<br />
elseif (condition)<br />
code to be executed if condition is true;<br />
else<br />
code to be executed if condition is false;</span></li>
</ul>
<ul>
<li>Switch statement &#8211; this statement is used to select one of many blocks of code to be executed
<p><span style="color: #808080;">switch (n)<br />
{<br />
case label1:<br />
code to be executed if n=label1;<br />
break;<br />
case label2:<br />
code to be executed if n=label2;<br />
break;<br />
default:<br />
code to be executed if n is different from both label1 and label2;<br />
}</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.goweb99.com/blog/php-tutorial/conditional-statements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
