<?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>php condition statement Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/php-condition-statement/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/php-condition-statement/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Thu, 29 Jul 2021 12:46:58 +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>Tutorials for PHP “Switch Case” Condition</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorials-for-php-switch-case-condition/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorials-for-php-switch-case-condition/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Thu, 29 Jul 2021 12:46:56 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[PHP “Switch Case” Condition]]></category>
		<category><![CDATA[Php Condition]]></category>
		<category><![CDATA[php condition statement]]></category>
		<category><![CDATA[Php conditional statements]]></category>
		<category><![CDATA[PHP Conditioning]]></category>
		<category><![CDATA[Switch Case]]></category>
		<category><![CDATA[Switch Case” Condition]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is “The switch Statement]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7166</guid>

					<description><![CDATA[<p>What is “The switch Statement”? The assertion (Switch) looks like a series of declarations that all say the same thing. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-switch-case-condition/">Tutorials for PHP “Switch Case” 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 “The switch Statement”?</h3>



<p class="wp-block-paragraph">The assertion (<code><span class="has-inline-color has-vivid-red-color"><strong>Switch</strong></span></code>) looks like a series of declarations that all say the same thing. To select one of the numerous executable code blocks, use the term (<code><span class="has-inline-color has-vivid-red-color"><strong>Switch</strong></span></code>).</p>



<pre class="wp-block-code"><code><span class="has-inline-color has-vivid-red-color">switch (n) {
  case label1:
    code to be executed if n=label1;
    break;
  case label2:
    code to be executed if n=label2;
    break;
  case label3:
    code to be executed if n=label3;
    break;
    ...
  default:
    code to be executed if n is different from all labels;
}</span></code></pre>



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



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



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



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



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://www.devopsschool.com/blog/wp-content/uploads/2021/05/image-37.png" alt=""/></figure></div>



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



<script src="https://gist.github.com/AdarshAshwani/31e693098a35c175248717f10b6e1281.js"></script>



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



<div class="wp-block-image"><figure class="aligncenter is-resized"><img fetchpriority="high" decoding="async" src="https://www.devopsschool.com/blog/wp-content/uploads/2021/05/image-38.png" alt="" width="684" height="78"/></figure></div>



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



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



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



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://www.devopsschool.com/blog/wp-content/uploads/2021/05/image-40.png" alt=""/></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-switch-case-condition/">Tutorials for PHP “Switch Case” 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-switch-case-condition/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tutorials for PHP “if elseif else” Condition</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-elseif-else-condition/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-elseif-else-condition/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 12:58:53 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[if else if else Condition]]></category>
		<category><![CDATA[if elseif else]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Php Condition]]></category>
		<category><![CDATA[php condition statement]]></category>
		<category><![CDATA[Php conditional statements]]></category>
		<category><![CDATA[PHP Conditioning]]></category>
		<category><![CDATA[PHP if else if else Condition]]></category>
		<category><![CDATA[PHP if elseif else Condition]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is The if...elseif...else Statement]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7160</guid>

					<description><![CDATA[<p>What is “The if...elseif...else&#8221; Statement“? The special Statement (if…elseif…else) is used to combine multiple Statements (if…else). The if-else-if-else statement allows you to [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-elseif-else-condition/">Tutorials for PHP “if elseif else” 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 “<strong>The <code>if...elseif...else</code>&#8221; Statement</strong>“?</h3>



<p class="wp-block-paragraph">The special Statement (<code><span class="has-inline-color has-vivid-red-color"><strong>if…elseif…else</strong></span></code>) is used to combine multiple Statements (<code><span class="has-inline-color has-vivid-red-color"><strong>if…else</strong></span></code>). The <code><span class="has-inline-color has-vivid-red-color"><strong>if-else-if-else</strong></span></code> statement allows you to combine multiple <code><span class="has-inline-color has-vivid-red-color"><strong>If-else</strong></span></code> statements, allowing the compiler to specify behaviors with more than two possible outcomes.</p>



<pre class="wp-block-code"><code><code><span class="has-inline-color has-vivid-red-color">if (condition) {
  code to be executed if this condition is true;
} else if (condition) {
  code to be executed if first condition is false and this condition is true;
} else {
  code to be executed if all conditions are false;
}</span></code></code></pre>



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



<p class="wp-block-paragraph"><strong>Example1:-</strong> If this condition is true!</p>



<script src="https://gist.github.com/AdarshAshwani/76afd72ce6370e7d0d30d40a4163bd37.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="680" height="73" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-18.png" alt="" class="wp-image-7162" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-18.png 680w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-18-300x32.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure></div>



<p class="wp-block-paragraph"><strong>Example2:-</strong> If first condition is false and this condition is true!</p>



<script src="https://gist.github.com/AdarshAshwani/2bb6ca5d0ef82073f2f28c09a624be39.js"></script>



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



<figure class="wp-block-image size-large"><img decoding="async" width="676" height="62" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-19.png" alt="" class="wp-image-7163" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-19.png 676w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-19-300x28.png 300w" sizes="(max-width: 676px) 100vw, 676px" /></figure>



<p class="wp-block-paragraph"><strong>Example3:-</strong> If all conditions are false!</p>



<script src="https://gist.github.com/AdarshAshwani/947ba58325719f8c58975e2174949093.js"></script>



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



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="679" height="64" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-20.png" alt="" class="wp-image-7164" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-20.png 679w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-20-300x28.png 300w" sizes="auto, (max-width: 679px) 100vw, 679px" /></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-elseif-else-condition/">Tutorials for PHP “if elseif else” 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-elseif-else-condition/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tutorials for PHP “if else” Condition</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-else-condition/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-else-condition/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 12:29:15 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[if else]]></category>
		<category><![CDATA[if else Condition]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Php Condition]]></category>
		<category><![CDATA[php condition statement]]></category>
		<category><![CDATA[Php conditional statements]]></category>
		<category><![CDATA[PHP Conditioning]]></category>
		<category><![CDATA[PHP if else Condition]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is The if...else Statement]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7150</guid>

					<description><![CDATA[<p>What is “The if...else Statement”? You can improve the decision-making process by adding a separate argument to the if statement. When using [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-else-condition/">Tutorials for PHP “if else” 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 “The <code>if...else</code> Statement”?</h3>



<p class="wp-block-paragraph">You can improve the decision-making process by adding a separate argument to the <code><span class="has-inline-color has-vivid-red-color"><strong>if</strong></span></code> statement. When using the <code><span class="has-inline-color has-vivid-red-color"><strong>if-else</strong></span></code> statement, you must run one block of code if the condition is true, and another block of code if it is false. The following is an example of how it could be written:</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://www.w3resource.com/w3r_images/c-if-else-statement.png" alt="C if else - w3resource"/></figure></div>



<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
} else{
    // Code to be executed if condition is false
}</span></code></code></pre>



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



<p class="wp-block-paragraph"><strong>Example1:-</strong> When The Condition is True!</p>



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



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



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="676" height="73" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-15.png" alt="" class="wp-image-7152" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-15.png 676w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-15-300x32.png 300w" sizes="auto, (max-width: 676px) 100vw, 676px" /></figure></div>



<p class="wp-block-paragraph"><strong>Example2:-</strong> When The Condition is False!</p>



<script src="https://gist.github.com/AdarshAshwani/6b595a8680ba4e410f4ae420e2c53ea4.js"></script>



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



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="676" height="64" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-16.png" alt="" class="wp-image-7153" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-16.png 676w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/image-16-300x28.png 300w" sizes="auto, (max-width: 676px) 100vw, 676px" /></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-if-else-condition/">Tutorials for PHP “if else” 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-else-condition/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 loading="lazy" 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="auto, (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>
		<item>
		<title>Tutorials for PHP Conditioning</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorials-for-php-conditioning/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorials-for-php-conditioning/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Tue, 27 Jul 2021 13:29:50 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[condition statement]]></category>
		<category><![CDATA[conditional statements]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[php condition statement]]></category>
		<category><![CDATA[Php conditional statements]]></category>
		<category><![CDATA[PHP Conditioning]]></category>
		<category><![CDATA[types of conditional statements]]></category>
		<category><![CDATA[What are the types of conditional statements]]></category>
		<category><![CDATA[What is PHP Conditioning]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7113</guid>

					<description><![CDATA[<p>What is PHP Conditioning? PHP, like other programming languages, allows you to build code that executes multiple behaviors based on [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-conditioning/">Tutorials for PHP Conditioning</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 PHP Conditioning?</h3>



<p class="wp-block-paragraph">PHP, like other programming languages, allows you to build code that executes multiple behaviors based on the results of logical or equivalent testing conditions. This presupposes that test conditions may be written in terms of expressions that evaluate <code><span class="has-inline-color has-vivid-red-color"><strong>true </strong></span></code>or <code><span class="has-inline-color has-vivid-red-color"><strong>false</strong></span></code>, and that actions can be carried out based on the results.</p>



<p class="wp-block-paragraph">PHP allows programmers to assess numerous situations and determine whether they are true or false during the programming process.</p>



<p class="wp-block-paragraph">A conditional statement is a programming structure that conveys these circumstances and their associated behavior.</p>



<h3 class="wp-block-heading">What are the types of conditional statements?</h3>



<p class="wp-block-paragraph">If the test condition is not used, PHP is used. There are several ways to use a sentence in PHP.</p>



<ul class="wp-block-list"><li>The&nbsp;<strong>if</strong>&nbsp;statement</li><li>The&nbsp;<strong>if…else</strong>&nbsp;statement</li><li>The&nbsp;<strong>if…elseif….else</strong>&nbsp;statement</li><li>The&nbsp;<strong>switch…case</strong>&nbsp;statement</li></ul>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://image.slidesharecdn.com/002phpconditionalstatementfinal-130822161707-phpapp02/95/conditional-statementfinal-php-02-8-638.jpg?cb=1386681842" alt="Conditional Statementfinal PHP 02"/></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorials-for-php-conditioning/">Tutorials for PHP Conditioning</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-conditioning/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
