<?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>If statement Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/if-statement/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/if-statement/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:30:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>What is the IF statement And Switch Statement in JavaScript?</title>
		<link>https://www.scmgalaxy.com/tutorials/what-is-the-if-statement-and-switch-statement-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/what-is-the-if-statement-and-switch-statement-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 12:24:40 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[condition statement]]></category>
		<category><![CDATA[If statement]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP Operators]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7143</guid>

					<description><![CDATA[<p>If Statement It is used to execute an instruction or block of instructions only if a condition is fulfilled. Syntax: [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-is-the-if-statement-and-switch-statement-in-javascript/">What is the IF statement And Switch Statement in JavaScript?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">If Statement</h2>



<p class="wp-block-paragraph">It is used to execute an instruction or block of instructions only if a condition is fulfilled.</p>



<p class="wp-block-paragraph">Syntax: &#8211;  </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
if (condition)
      {
           block of statements;
      }
</pre></div>


<h2 class="wp-block-heading">If statement with logical operator</h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
if ( (condition1) &amp;amp;&amp;amp; (condition2) )
     {
        block of statements;
     }

</pre></div>


<h2 class="wp-block-heading">If else Statement</h2>



<p class="wp-block-paragraph">if… else statement is used when a different sequence of instructions is to be executed depending<br>on the logical value(True/False) of the condition evaluated.</p>



<p class="wp-block-paragraph">Syntax: &#8211;</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
if(condition)
   {
     Statement_1_Block;
   }
else
   {
     Statement_2_Block;
   }
   Statement_3;
</pre></div>


<h2 class="wp-block-heading">Else If Statement</h2>



<p class="wp-block-paragraph">To show a multi-way decision based on several conditions, we use else if statement.</p>



<p class="wp-block-paragraph">Syntax: &#8211;</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
If(condition_1)
   {
     statements_1_Block;
   }
else if(condition_2)
   {
     statement_2_Blocks;
   }
else if(condition_n)
   {
     Statements_n_Block;
   }
else
 statements_x;
</pre></div>


<h2 class="wp-block-heading">Switch Statement</h2>



<p class="wp-block-paragraph">Check several possible constant values for an expression.</p>



<p class="wp-block-paragraph">Syntax: &#8211;</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
switch(expression){
      case expression 1:
            block of statements 1;
            break;
      case expression2;:
            block of statements 2;
            break;
            .
            .
      default:
            default block of instructions;
      }

</pre></div>


<p class="wp-block-paragraph">All the cases will be evaluated if you don&#8217;t use a break statement.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
switch(expression){
            case expression 1:
                 block of statements 1;
                 break;
            case expression 2:
            case expression 3:
                 block of statements 2;
                 break;
            default:
                 default block of instructions;
            }
</pre></div>


<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-is-the-if-statement-and-switch-statement-in-javascript/">What is the IF statement And Switch Statement in JavaScript?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/what-is-the-if-statement-and-switch-statement-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tutorials for PHP &#8220;if&#8221; Condition</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-condition/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-condition/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 12:05:45 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Condition]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[if Condition]]></category>
		<category><![CDATA[If statement]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Php Condition]]></category>
		<category><![CDATA[php condition statement]]></category>
		<category><![CDATA[PHP Conditioning]]></category>
		<category><![CDATA[PHP if Condition]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is If statement]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7142</guid>

					<description><![CDATA[<p>What is If statement? If the conditions stated are true, the (if statement) is used to execute the code block. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-condition/">Tutorials for PHP &#8220;if&#8221; Condition</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is If statement?</h3>



<p class="wp-block-paragraph">If the conditions stated are true, the (<code><span class="has-inline-color has-vivid-red-color"><strong>if</strong></span></code> statement) is used to execute the code block. In PHP, these are the most basic and cross-platform statements. The if statement in PHP allows code to be executed only if it meets certain criteria. It is executed if condition is True.</p>



<p class="wp-block-paragraph"><strong>Syntax:-</strong></p>



<pre class="wp-block-code"><code><code><span class="has-inline-color has-vivid-red-color">if (condition) {
  code to be executed if condition is true;
}</span></code></code></pre>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://cdn.programiz.com/sites/tutorial2program/files/cpp-if-else-working.png" alt="C++ If...else (With Examples)"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://static.javatpoint.com/phppages/images/if1.png" alt="PHP If Else - javatpoint"/></figure></div>



<p class="wp-block-paragraph"><strong>Examples:-</strong></p>



<script src="https://gist.github.com/AdarshAshwani/299a9aeed2797c4b9e21557890627908.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="681" height="57" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-14.png" alt="" class="wp-image-7148" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-14.png 681w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-14-300x25.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-condition/">Tutorials for PHP &#8220;if&#8221; Condition</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-condition/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
