<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5745959410712023745</id><updated>2024-09-10T20:03:44.565-07:00</updated><category term="PHP Array Tutorial"/><category term="PHP Arrays with Loops Tutorial"/><category term="PHP Associative Array Tutorial"/><category term="PHP Basic Math Function Tutorial"/><category term="PHP Date Function Tutorial"/><category term="PHP Do While Loop Tutorial"/><category term="PHP Explode Function Tutorial"/><category term="PHP For Loop Tutorial"/><category term="PHP Foreach Loop Tutorial"/><category term="PHP Functions Tutorial"/><category term="PHP If Else If Else Statement Tutorial"/><category term="PHP If Else Statement Tutorial"/><category term="PHP If Statement Tutorial"/><category term="PHP Include Function Tutorial"/><category term="PHP Introduction to Form Tutorial"/><category term="PHP Parameters in Functions Tutorial"/><category term="PHP Return Values of Function Tutorial"/><category term="PHP Trim Function Tutorial"/><category term="PHP While Loop Tutorial"/><category term="PHP gatedate Function Tutorial"/><category term="PHP str shuffle Function Tutorial"/><category term="PHP strlen Function Tutorial"/><category term="PHP strpos Function Tutorial"/><category term="PHP strrev Function Tutorial"/><category term="php"/><title type='text'>PHP Tutorial</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-5886359311117053144</id><published>2012-04-30T00:08:00.002-07:00</published><updated>2012-04-30T00:08:29.388-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Introduction to Form Tutorial"/><title type='text'>PHP Introduction to Form Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Introduction to Form&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;input type=&quot;text&quot;&amp;gt;&amp;nbsp;&lt;/strong&gt;tag is a text box, while&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;input type=&quot;submit&quot;&amp;gt;&lt;/strong&gt;&amp;nbsp;creates a submit button for sending web page back to the web server.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;index.php&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;html&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form action =&quot;loginTest.php&quot; method=&quot;post&quot;&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name: &amp;lt;input type =&quot;text&quot; name=&quot;name&quot;/&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot;/&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;form action=&quot;http://aspell.org/PHP/Form_Introduction.php&quot; method=&quot;post&quot; style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Name:&amp;nbsp;&lt;input name=&quot;name&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-top: 0px;&quot; type=&quot;text&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;input style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/form&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
When we click&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;submit&lt;/strong&gt;&amp;nbsp;button, nothing happens. Because in our&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;loginTest.php&lt;/strong&gt;&amp;nbsp;is a blank or not exist yet that does not give any actions or directions or anything.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;index.php&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;html&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form action =&quot;loginTest.php&quot; method=&quot;post&quot;&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name: &amp;lt;input type =&quot;text&quot; name=&quot;name&quot;/&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot;/&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;loginTest.php&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;html&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; echo $_POST[&quot;name&quot;];&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;form action=&quot;http://aspell.org/PHP/loginTest.php&quot; method=&quot;post&quot; style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Name:&amp;nbsp;&lt;input name=&quot;name&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-top: 0px;&quot; type=&quot;text&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;input style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/form&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Whenever we click&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;submit&lt;/strong&gt;&amp;nbsp;button, control goes to the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;loginTest.php&lt;/strong&gt;.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$_POST indicates that getting the information from a form and not a normal variable.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If you don’t write&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;method=&quot;post&quot;&lt;/strong&gt;, then it looks for a variable on the same page. i.e., by making $_POST, is going to look variable on another page.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo $_POST[&quot;name&quot;] says, we want to echo something from a form, whatever the input for the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;name&lt;/strong&gt;&amp;nbsp;variable.&lt;/div&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/5886359311117053144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-introduction-to-form-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/5886359311117053144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/5886359311117053144'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-introduction-to-form-tutorial.html' title='PHP Introduction to Form Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-5119526330896395174</id><published>2012-04-30T00:07:00.000-07:00</published><updated>2012-04-30T00:07:08.293-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Basic Math Function Tutorial"/><title type='text'>PHP Basic Math Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Basic Math Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
PHP is pretty much like a big calculator.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;You can do basic math function right in your variable. A variable equal to whatever equations you have and then displays the output on the screen. Bunch of stuff you can do, like addition, subtraction, multiply, division, remainder, etc.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $anything = 10;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $anything;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;10&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Addition&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$anything = 10+500;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $anything;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;510&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Subtraction&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 3&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$anything = 10-500;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $anything;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;-490&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Adding two variables&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 3&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$anything = 55;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$something = 45;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $anything + $something;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;100&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/5119526330896395174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-basic-math-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/5119526330896395174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/5119526330896395174'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-basic-math-function-tutorial.html' title='PHP Basic Math Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-7279462423914655584</id><published>2012-04-30T00:06:00.000-07:00</published><updated>2012-04-30T00:06:15.725-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP strpos Function Tutorial"/><title type='text'>PHP strpos Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
strpos Function&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;1.&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;strpos&lt;/em&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;function allows to find data in a particular string.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;2. If a match is found in the string,&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;strpos&lt;/em&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;function will return the position of the first match. If no match is found, it will return FALSE.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; echo strpos(&quot;Hello world!&quot;,&quot;world&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;6&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The position of the data&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;world&lt;/strong&gt;&amp;nbsp;in our string is position 6.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Because,&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;strops&amp;nbsp;&lt;/strong&gt;starts count from zero.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $string = &#39;I will develop my wisdom and intuition. I will realize my infinite potential fully.&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$find= &#39;wisdom&#39;;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo strpos($string, $find);&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;18&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/7279462423914655584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-strpos-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/7279462423914655584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/7279462423914655584'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-strpos-function-tutorial.html' title='PHP strpos Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-324598008473609614</id><published>2012-04-30T00:04:00.002-07:00</published><updated>2012-04-30T00:04:38.128-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Include Function Tutorial"/><title type='text'>PHP Include Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Include Function&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Let&#39;s say we want to put hundred different web pages. Bunch of time, going to webpage to webpage and updating each one, one by one, with&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;include&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;function.&lt;/span&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
menu.php&lt;/div&gt;
&amp;lt;html&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;head&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;lt;body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ul&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;Home &amp;lt;/li&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;li&amp;gt;HTML&amp;lt;/li&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;li&amp;gt;PHP &amp;lt;/li&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/ul&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;/body&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Home&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;HTML&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;PHP&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;You need very time to display the above output in your every web page.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Just use&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;include&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;key word and file name that you attach.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
first.php&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;include &#39;menu.php&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;p&amp;gt; This is first page &amp;lt;p/&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
second.php&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;include &#39;menu.php&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;lt;p&amp;gt; This is second page &amp;lt;p/&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;You need not open&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;menu.php&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;file.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;When you open&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;first.php&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;file and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;second.php&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;file,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;menu.php&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;file will automatically open each time. Need not require write extra code for menu. Include acts like function call.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/324598008473609614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-include-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/324598008473609614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/324598008473609614'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-include-function-tutorial.html' title='PHP Include Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-4787684246723565024</id><published>2012-04-30T00:03:00.002-07:00</published><updated>2012-04-30T00:03:50.190-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Trim Function Tutorial"/><title type='text'>PHP Trim Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Trim Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax:&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;trim(string,charlist)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;trim()&amp;nbsp;function&lt;/strong&gt;&amp;nbsp;takes two parameters.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;trim()&amp;nbsp;function&lt;/strong&gt;&amp;nbsp;strips whitespaces or other characters from the both sides i.e. beginning and end of a string.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the second argument,&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;charlist&lt;/strong&gt;&amp;nbsp;is not specified,&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;trim() function&lt;/strong&gt;&amp;nbsp;strips all whitespace (&quot; &quot;), new line &quot;\n&quot;, tab (&quot;\t&quot;), carriage return (&quot;\r&quot;) by default.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str = &#39;&amp;amp;nbsp;This is a test.&amp;amp;nbsp;&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str_trimed = trim($str);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $str_trimed;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $str;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;This is a test.&amp;nbsp;&amp;nbsp;This is a test.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str = &#39;?My workload is increasing. I am learning to prioritize.?&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str_trimed = trim($str, &quot;?&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $str;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;&amp;lt;br&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $str_trimed;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;?My workload is increasing. I am learning to prioritize.?&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;My workload is increasing. I am learning to prioritize.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Notice that &#39;?&#39; is trimmed both sides from string.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/4787684246723565024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-trim-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/4787684246723565024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/4787684246723565024'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-trim-function-tutorial.html' title='PHP Trim Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-6012534782586899936</id><published>2012-04-30T00:02:00.005-07:00</published><updated>2012-04-30T00:02:56.552-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP strrev Function Tutorial"/><title type='text'>PHP strrev Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
strrev Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax:&lt;/strong&gt;strrev(string)&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The strrev() function is used to to reverse a string.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str = &#39;This is a test&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str_reversed = strrev($str);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $str_reversed;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;tset a si sihT&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/6012534782586899936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-strrev-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/6012534782586899936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/6012534782586899936'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-strrev-function-tutorial.html' title='PHP strrev Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-524915067148240796</id><published>2012-04-30T00:02:00.002-07:00</published><updated>2012-04-30T00:02:17.664-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP strlen Function Tutorial"/><title type='text'>PHP strlen Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
strlen Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;strlen&lt;/strong&gt;&amp;nbsp;function is used to return the length of a string.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;strlen(string)&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str = &#39;I will dress suitably according to my environment.&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str_length = strlen($str);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $str_length;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;50&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/524915067148240796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-strlen-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/524915067148240796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/524915067148240796'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-strlen-function-tutorial.html' title='PHP strlen Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-8428973495975058994</id><published>2012-04-30T00:01:00.002-07:00</published><updated>2012-04-30T00:01:26.648-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP str shuffle Function Tutorial"/><title type='text'>PHP str shuffle Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
str shuffle Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax:&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;str_shuffle(string)&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The str_shuffle() function randomly shuffles all the characters of a string.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The str_shuffle() function is mainly used for to to generate a random password or produce random characters for CAPTCHA validation image.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Each time this function executes and it will randomly re-shuffle the string.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $string = &#39;This is a test&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $x=str_shuffle($string);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $x;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;aih istT sest&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Random character generator.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $string = &#39;abcdefghijklmnopqrstwxyz0123456789&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $x=str_shuffle($string);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $y = substr($x,0, 5);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $y;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;g1c3w&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 3&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$string = &#39;abcdefghijklmnopqrstwxyz0123456789&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$x=str_shuffle($string);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$y = substr($x,0, strlen($string)/2);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $y;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;57zo04xp3hykcl1ei&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
See a password generator program below the link:&lt;/div&gt;
&lt;a href=&quot;http://www.mombu.com/php/php/t-note-73254-added-to-functionstr-shuffle-762050.html&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-decoration: none;&quot;&gt;Password Generator Program&lt;/a&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/8428973495975058994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-str-shuffle-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8428973495975058994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8428973495975058994'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-str-shuffle-function-tutorial.html' title='PHP str shuffle Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-8341509956454386105</id><published>2012-04-30T00:00:00.002-07:00</published><updated>2012-04-30T00:00:30.741-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Explode Function Tutorial"/><title type='text'>PHP Explode Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Explode Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;syntax&lt;/strong&gt;:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$array_name = explode($delimiter, $string);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The explode() function is used to split up strings based on the specified delimiter.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;It is similar to the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;split&lt;/strong&gt;&amp;nbsp;function in Javascript.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Once the string is split or broken up, the pieces are stored in an array and they are numbered in order, starting from 0.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str = &quot;I am responsible for my own health.&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print_r (explode(&quot; &quot;,$str));&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Another way:&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$str = &quot;I am responsible for my own health.&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$parts = (explode(&quot; &quot;,$str));&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print_r ($parts);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Array ( [0] =&amp;gt; I [1] =&amp;gt; am [2] =&amp;gt; responsible [3] =&amp;gt; for [4] =&amp;gt; my [5] =&amp;gt; own [6] =&amp;gt; health. )&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
We can apply explode function on date or phone number.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Let&#39;s see an example.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$D_M_Y = date(&quot;d/m/Y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$parts = (explode(&#39;/&#39; ,$D_M_Y));&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print_r ($parts);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Array ( [0] =&amp;gt; 30 [1] =&amp;gt; 04 [2] =&amp;gt; 2012 )&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Notice that today&#39;s date is broken.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/8341509956454386105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-explode-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8341509956454386105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8341509956454386105'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-explode-function-tutorial.html' title='PHP Explode Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-954702550811951530</id><published>2012-04-29T23:59:00.002-07:00</published><updated>2012-04-29T23:59:34.793-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP gatedate Function Tutorial"/><title type='text'>PHP gatedate Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
gatedate Function&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;getdate()&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;function returns an array that contains date ten elements with relevant information needed when formatting a date string:&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[seconds] - seconds&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [minutes] - minutes&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [hours] - hours&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [mday] - day of the month (numeric)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [wday] - day of the week (numeric)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [mon] - month&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [year] - year&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[yday] - day of the year (numeric)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[weekday] - name of the weekday&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [month] - name of the month&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Syntax&lt;/b&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;getdate(timestamp)&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;timestamp&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;is optional.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;print_r(getdate());&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Array ( [seconds] =&amp;gt; 51 [minutes] =&amp;gt; 58 [hours] =&amp;gt; 2 [mday] =&amp;gt; 30 [wday] =&amp;gt; 1 [mon] =&amp;gt; 4 [year] =&amp;gt; 2012 [yday] =&amp;gt; 120 [weekday] =&amp;gt; Monday [month] =&amp;gt; April [0] =&amp;gt; 1335769131 )&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$today = getdate();&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Month = $today[&#39;month&#39;];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Day = $today[&#39;mday&#39;];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Year = $today[&#39;year&#39;];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Hour = $today[&#39;hours&#39;];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Minutes = $today[&#39;minutes&#39;];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Seconds = $today[&#39;seconds&#39;];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;Today&#39;s date is $Day $Month $Year&quot;.&quot;&amp;lt;br&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;The time is now $Hour $Minutes $Seconds&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Today&#39;s date is 30 April 2012&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;The time is now 2 58 51&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/954702550811951530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-gatedate-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/954702550811951530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/954702550811951530'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-gatedate-function-tutorial.html' title='PHP gatedate Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-1536271439776296259</id><published>2012-04-29T23:58:00.000-07:00</published><updated>2012-04-29T23:58:38.818-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Date Function Tutorial"/><title type='text'>PHP Date Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Date Function&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
To display in numeric format:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;1.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;d&lt;/strong&gt;, a lower case&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;d,&lt;/strong&gt;&amp;nbsp;stands for date of the month( 1 to 31).&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;m,&lt;/strong&gt;&amp;nbsp;a lower case&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;m&lt;/strong&gt;, stands for the month( 1 to 12).&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;y&lt;/strong&gt;, a lower case&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;y&lt;/strong&gt;, stands for the year(in two digits).&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;To display in text format:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;1.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;D,&lt;/strong&gt;&amp;nbsp;a capital&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;D,&lt;/strong&gt;&amp;nbsp;stands for day of the month in tex( Saturday, Sunday, etc. ).&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;M,&lt;/strong&gt;a capital&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;M,&lt;/strong&gt;&amp;nbsp;stands for the month in text( 1 to 12).&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Y,&lt;/strong&gt;&amp;nbsp;Capital&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Y,&lt;/strong&gt;&amp;nbsp;stands for date of the year(in four digits).&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;highlight&quot; style=&quot;color: #e8872e; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 1.25em; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
To display in numeric format:&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;d/m/y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;30/04/12&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;You can change the format like period.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;d.m.y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;30.04.12&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;You can also use minus sign.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 3&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;d-m-y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;}&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;30-04-12&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;highlight&quot; style=&quot;color: #e8872e; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 1.25em; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
To display in text format:&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;D/M/Y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Mon/Apr/2012&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;You can change the format like period.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;D.M.Y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Mon.Apr.2012&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;You can also use minus sign.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 3&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;D-M-Y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;}&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Mon-Apr-2012&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;To display full date:&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 4&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo date(&quot;d D M Y&quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;}&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;30 Mon Apr 2012&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The following example will output &quot;Have a nice weekend!&quot; if the current day is Sunday, otherwise it will output &quot;Have a nice day!&quot;:&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 5&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
$d=date(&quot;D&quot;);&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
if ($d==&quot;Sun&quot;)&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp; echo &quot;Have a nice weekend!&quot;;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
else&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp; echo &quot;Have a nice day!&quot;;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Have a nice day!&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/1536271439776296259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-date-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/1536271439776296259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/1536271439776296259'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-date-function-tutorial.html' title='PHP Date Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-6596051043730058567</id><published>2012-04-29T23:56:00.002-07:00</published><updated>2012-04-29T23:56:57.550-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Associative Array Tutorial"/><title type='text'>PHP Associative Array Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Associative Array&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Associative array = Associative word with another word.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
In the script below, we create the basis for a Acronym Lookup program in PHP. We will use an associative array to reference the meaning of each acronym, and use the acronym as the associative array&#39;s index:&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
We have three associative arrays: MPLS (links the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Multi-Protocol Label Switching&lt;/strong&gt;), SSTP (links the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Secure Socket Tunneling Protocol&lt;/strong&gt;), and LDAP (links the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Lightweight Directory Access Protocol&lt;/strong&gt;).&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; $protocols = array(&#39;MPLS&#39;=&amp;gt;&#39;Multi-Protocol Label Switching&#39;, &#39;SSTP&#39;=&amp;gt;&#39;Secure Socket Tunneling Protocol&#39;, &#39;LDAP&#39;=&amp;gt;&#39;Lightweight Directory Access Protocol&#39;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; echo $protocols[&#39;MPLS&#39;].&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; echo $protocols[&#39;SSTP&#39;].&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; echo $protocols[&#39;LDAP&#39;];&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Multi-Protocol Label Switching&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Secure Socket Tunneling Protocol&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Lightweight Directory Access Protocol&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$protocols = array();&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$Protocols[&#39;MPLS&#39;]= &#39;Multi-Protocol Label Switching&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$Protocols[&#39;SSTP&#39;]= &#39;Secure Socket Tunneling Protocol&#39;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$Protocols[&#39;LDAP&#39;]= &#39;Lightweight Directory Access Protocol&#39;;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
echo &#39;MPLS stands for: &#39;.$Protocols[&#39;MPLS&#39;].&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &#39;SSTP stands for: &#39;.$Protocols[&#39;SSTP&#39;].&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &#39;LDAP stands for: &#39;.$Protocols[&#39;LDAP&#39;].&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;MPLS stands for: Multi-Protocol Label Switching&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;SSTP stands for: Secure Socket Tunneling Protocol&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;LDAP stands for: Lightweight Directory Access Protocol&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/6596051043730058567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-associative-array-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/6596051043730058567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/6596051043730058567'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-associative-array-tutorial.html' title='PHP Associative Array Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-8130965548009405108</id><published>2012-04-29T23:56:00.000-07:00</published><updated>2012-04-29T23:56:01.463-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Arrays with Loops Tutorial"/><title type='text'>PHP Arrays with Loops Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Arrays with Loops&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$people = array(&#39;Oliva&#39;, &#39;Nicole&#39;, &#39;Natasha&#39;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for ($x=0; $x&amp;lt;sizeof($people); $x++)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $people[$x].&quot;&amp;lt;br /&amp;gt;&quot;;&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Oliva&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Nicole&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Natasha&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Another way&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $people = array(&#39;Oliva&#39;, &#39;Nicole&#39;, &#39;Natasha&#39;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach ($people as $x)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $x.&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Oliva&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Nicole&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Natasha&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/8130965548009405108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-arrays-with-loops-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8130965548009405108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8130965548009405108'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-arrays-with-loops-tutorial.html' title='PHP Arrays with Loops Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-2703419377039532546</id><published>2012-04-29T23:55:00.000-07:00</published><updated>2012-04-29T23:55:14.121-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Array Tutorial"/><title type='text'>PHP Array Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Arrays&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
1. The Array object is used to store multiple values or more than one value in a similar data type variable.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2. Accessing a particular element in an array by referring to the name of the array and the index number.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3. The index number of array starts from 0.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;4. If you specify numbers or true/false values inside the array then the variable type will be Number or Boolean, instead of String.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;5. Note:&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Array&lt;/strong&gt;&amp;nbsp;is a key word.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
An array can be defined in three ways:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Numeric array&lt;/strong&gt;&amp;nbsp;- An array with a numeric ID key&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Associative array&lt;/strong&gt;&amp;nbsp;- An array where each ID key is associated with a value&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Multidimensional array&lt;/strong&gt;&amp;nbsp;- An array containing one or more arrays&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$people[0] = &quot;Oliva&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$people[1] = &quot;Nicole&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$people[2] = &quot;Natasha&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $people[1];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Nicole&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Another way&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $people = array(&#39;Oliva&#39;, &#39;Nicole&#39;, &#39;Natasha&#39;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $people[1];&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Nicole&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/2703419377039532546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-array-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/2703419377039532546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/2703419377039532546'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-array-tutorial.html' title='PHP Array Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-3977349506306680154</id><published>2012-04-29T23:54:00.002-07:00</published><updated>2012-04-29T23:54:20.637-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Do While Loop Tutorial"/><title type='text'>PHP Do While Loop Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Do While Loop&lt;/div&gt;
&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Do while loop&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;allows you to execute an action at least one time no matter if it is true or false. The loop executes round and round while the condition is true. When the condition becomes false, the loop breaks out or terminates of the loop.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Syntax&lt;/strong&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;do&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;// statements that will be executed&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;while(condition)&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $num=1;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $num++;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;echo $num.&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;while ($num&amp;lt;10);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;2&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;3&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;4&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;5&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;6&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;7&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;8&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;9&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;10&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/3977349506306680154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-do-while-loop-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3977349506306680154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3977349506306680154'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-do-while-loop-tutorial.html' title='PHP Do While Loop Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-3362629687568420631</id><published>2012-04-29T23:53:00.000-07:00</published><updated>2012-04-29T23:53:17.939-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP While Loop Tutorial"/><title type='text'>PHP While Loop Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
While Loop&lt;/div&gt;
&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;While loop&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;is used to execute a set of statements repeatedly until a condition becomes false.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;strong style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Syntax&lt;/strong&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;:&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;while(condition)&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;// statements that will be executed&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $num=1;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while($num&amp;lt;=5)&amp;nbsp;&amp;nbsp; //[While the variable ‘num’ is less than or equal to 5.]&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $num.&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $num++;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;1&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;2&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;3&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;4&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;5&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/3362629687568420631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-while-loop-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3362629687568420631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3362629687568420631'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-while-loop-tutorial.html' title='PHP While Loop Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-9041623673476788213</id><published>2012-04-29T23:52:00.000-07:00</published><updated>2012-04-29T23:52:12.954-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Foreach Loop Tutorial"/><title type='text'>PHP Foreach Loop Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Foreach Loop&lt;/div&gt;
&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Syntax&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
foreach ($array_variable as $value)&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; [code to execute]&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;or&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
foreach ($array_variable as $key =&amp;gt; $value)&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; [code to execute]&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; $x=array(1,2,3,4,5);&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; foreach ($x as $value)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo “New value is “.$value*10 . &quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;highlight&quot; style=&quot;color: #e8872e; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 1.25em; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;New value is 10&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;New value is 20&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;New value is 30&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;New value is 40&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;New value is 50&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/9041623673476788213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-foreach-loop-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/9041623673476788213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/9041623673476788213'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-foreach-loop-tutorial.html' title='PHP Foreach Loop Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-1379682358154104513</id><published>2012-04-29T23:51:00.000-07:00</published><updated>2012-04-29T23:51:05.256-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP For Loop Tutorial"/><title type='text'>PHP For Loop Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
For Loop&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
For loop executes a certain condition as many times as you want.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Syntax&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;for(intial value; condition; increment)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;// set of statements that will be executed&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;All the three parameters are separated by semicolon &quot;;&quot;.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Loop is used to execute the same set of statements with a specified number of times(until a condition is satisfied) in incremental or detrimental way.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($num=1; $num&amp;lt;=5; $num++)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $num.&quot;&amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;1&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;2&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;3&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;4&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;5&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Note&lt;/strong&gt;: When “i&amp;lt;=5” executes, then condition remain true and loop terminates when “i=6”. “i&amp;lt;=5” says “i is less than or equal to 5”.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$sum=0;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for($i=1; $i&amp;lt;5; $i++)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$sum = $sum+$i;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;The sum of 1 through 4 is: &quot;.$sum;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;The sum of 1 through 4 is: 10&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/1379682358154104513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-for-loop-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/1379682358154104513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/1379682358154104513'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-for-loop-tutorial.html' title='PHP For Loop Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-8365359814680830968</id><published>2012-04-29T23:50:00.000-07:00</published><updated>2012-04-29T23:50:00.587-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Return Values of Function Tutorial"/><title type='text'>PHP Return Values of Function Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Functions&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function add($a, $b)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$total=$a+$b;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $total;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;echo add(7,7);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;14&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/8365359814680830968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-return-values-of-function-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8365359814680830968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/8365359814680830968'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-return-values-of-function-tutorial.html' title='PHP Return Values of Function Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-1955587606632979733</id><published>2012-04-29T23:49:00.001-07:00</published><updated>2012-04-29T23:49:00.308-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Parameters in Functions Tutorial"/><title type='text'>PHP Parameters in Functions Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Parameters in Functions&lt;/div&gt;
&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Syntax&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Function Function_Name([&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;arg1&amp;nbsp;&lt;/em&gt;[,&amp;nbsp;&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;arg2&amp;nbsp;&lt;/em&gt;[, ...&amp;nbsp;&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;argN&amp;nbsp;&lt;/em&gt;]],]){&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Function_Body&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;/em&gt;&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
You can pass&amp;nbsp;&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;arguments&lt;/em&gt;&amp;nbsp;to a function.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Parameters helps to pass informations/&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;arguments&lt;/em&gt;&amp;nbsp;into the function.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The arguments can be either numbers or strings.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Output of the function depends on the arguments you give it.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;function test($sub)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo $sub.&quot; Parameter &amp;lt;br /&amp;gt;&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;test(&quot;First &quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;test(&quot;Second &quot;);&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;First Parameter&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Second Parameter&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/1955587606632979733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-parameters-in-functions-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/1955587606632979733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/1955587606632979733'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-parameters-in-functions-tutorial.html' title='PHP Parameters in Functions Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-4161196656629694331</id><published>2012-04-29T23:47:00.001-07:00</published><updated>2012-04-29T23:47:35.858-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Functions Tutorial"/><title type='text'>PHP Functions Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Functions&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
1. A function is a block of statements that perform a specific task of same kind.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2. A function has a name and it is reusable.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3. A function invoked from other parts of a program.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;4. A function may have return value or not.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;5. A function may have parameters or not.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;6. The statements inside the function will not be executed automatically.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;7. The function is called from any part of the program and then execute the statements inside the function.&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Syntax&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;function name()&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;// statements that will be executed&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div id=&quot;ans&quot; style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;function test()&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &quot;I am inside function test()&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &quot;After this line, function test() will call.&amp;lt;br&amp;gt; &quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;test();&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;After this line, function test() will call.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;I am inside function test()&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div id=&quot;ans&quot; style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;function test1()&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &quot;&amp;lt;br&amp;gt;I am inside function test()&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &quot;After this line, function test() will call.&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;test1();&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;echo &quot;&amp;lt;br /&amp;gt;&quot;.&quot;Again function test() will call, after this line. &quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;test1();&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;After this line, function test() will call.&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;I am inside function test()&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Again function test() will call, after this line.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;I am inside function test()&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/4161196656629694331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-functions-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/4161196656629694331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/4161196656629694331'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-functions-tutorial.html' title='PHP Functions Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-7972426391154015528</id><published>2012-04-29T23:46:00.001-07:00</published><updated>2012-04-29T23:46:21.266-07:00</updated><title type='text'>PHP Switch Statement Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Switch Statement&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The Switch statement in PHP is used to perform one of several different actions based on one of several different conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Switch case is used to when a condition may have multiple results.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If you want to select one of many blocks of code to be executed, use the Switch statement.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Switch statement is similar to&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if..else if..else&lt;/strong&gt;&amp;nbsp; statement.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The switch statement is used to avoid long blocks of&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if..else if..else&lt;/strong&gt;&amp;nbsp;code.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;b style=&quot;color: #006680; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Syntax&lt;/b&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;switch (&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;expression&lt;/em&gt;)&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;{&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;case &lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;label1:&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;code to be executed if expression = label1;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; break;&amp;nbsp; &lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;case &lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;label2:&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;code to be executed if expression = label2;&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; break;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;default:&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;code to be executed&lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp; if expression is different &lt;/em&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: #333333; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;em style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;from both label1 and label2;&lt;/em&gt; &lt;/pre&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;How it works&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;1. The value of the&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;expression&amp;nbsp;&lt;/strong&gt;is compared with the values for each case in the structure .&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2. If there is a match, the code associated with that case is executed.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3. After a code is executed,&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;break&amp;nbsp;&lt;/strong&gt;is used to stop the code from running into the next case.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;break&lt;/strong&gt;&amp;nbsp;means, if there is one statement executes, then there is no need to go rest of&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;case&lt;/strong&gt;&amp;nbsp;statement.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;4. The&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;default&lt;/strong&gt;&amp;nbsp;statement is used if none of the cases are true.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Last case is always default. This is similar to the last&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/strong&gt;&amp;nbsp;statement.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If none of the above conditions are true, then&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;default&lt;/strong&gt;&amp;nbsp;will execute.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $country = &quot;USA&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch($country)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;case &quot;USA&quot;:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;you are in USA&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;Japan&quot;:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;you are in Japan&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;you messes up&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;you are in USA&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$x = 4;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;switch ($x)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;case 1:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; echo &quot;Number 1&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; break;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;case 2:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; echo &quot;Number 2&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; break;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;case 3:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; echo &quot;Number 3&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; break;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;default:&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; echo &quot;No number between 1 and 3&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;No number between 1 and 3&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/7972426391154015528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-switch-statement-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/7972426391154015528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/7972426391154015528'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-switch-statement-tutorial.html' title='PHP Switch Statement Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-3750536653530017024</id><published>2012-04-29T23:45:00.001-07:00</published><updated>2012-04-29T23:45:14.177-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP If Else If Else Statement Tutorial"/><title type='text'>PHP If Else If Else Statement Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
If Else If Else Statement&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax&lt;/strong&gt;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if(condition1)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// execute this block if condition1 is true&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else if (condition2)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// execute this block if condition2 is true&amp;nbsp;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;.&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;.&lt;/strong&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
else{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// execute this block if all above conditions are false&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Conditional statements are used to perform different actions based on different conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;1.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if…else if…else statement&lt;/strong&gt;&amp;nbsp; are also known as conditional statements. This simply means that they are able to take action or decision based on various conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if…else if…else statement&lt;/strong&gt;&amp;nbsp; is used to check one blocks of code from many blocks of code.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the condition is true then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/strong&gt;&amp;nbsp;will be executed.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Otherwise the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else if&lt;/strong&gt;&amp;nbsp;will be executed.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If all conditions are false then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/strong&gt;&amp;nbsp;will be executed.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if…else if…else statement&lt;/strong&gt;&amp;nbsp; allows the computer to make decisions based on the values of variables which can take the specified action based on the input that is given.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the decision or condition is true then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/strong&gt;&amp;nbsp;will be executed.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the decision or condition is false then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else if&lt;/strong&gt;&amp;nbsp;will be executed.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If all conditions are false then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/strong&gt;&amp;nbsp;will be executed.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
You can use this&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;elseif&lt;/strong&gt;&amp;nbsp;statement many times as you want.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;You can just use it one time or 40 times, it does not matter.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; $name=&quot;mila&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if ($name==&quot;mila&quot;)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;hello mila&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else if ($name==&quot;joe&quot;)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;hello joe&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;nobody is here&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;hello mila&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; $name=&quot;joe&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if ($name==&quot;mila&quot;)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;hello mila&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else if ($name==&quot;joe&quot;)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;hello joe&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;nobody is here&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;hello joe&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 3&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; $name=&quot;Aspell&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if ($name==&quot;mila&quot;)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;hello mila&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else if ($name==&quot;joe&quot;)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;hello joe&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;nobody is here&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;nobody is here&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/3750536653530017024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-if-else-if-else-statement-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3750536653530017024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3750536653530017024'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-if-else-if-else-statement-tutorial.html' title='PHP If Else If Else Statement Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-7660956765361364862</id><published>2012-04-29T23:43:00.001-07:00</published><updated>2012-04-29T23:43:13.735-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP If Else Statement Tutorial"/><title type='text'>PHP If Else Statement Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
If Else Statement&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax&lt;/strong&gt;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if(condition)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// execute this block if condition is true&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// execute this block if condition is false&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Conditional statements are used to perform different actions based on different conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;1.&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;I&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;f…else statements&lt;/strong&gt;&lt;/strong&gt;&amp;nbsp; are also known as conditional statements. This simply means that they are able to take action or decision based on various conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;I&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;f…else statements&lt;/strong&gt;&lt;/strong&gt;&amp;nbsp;is used to check whether specified condition is true or false.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the condition is true then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/strong&gt;&amp;nbsp;will be executed. If the condition is false then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/strong&gt;&amp;nbsp;will be executed.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;I&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;f…else statements&lt;/strong&gt;&lt;/strong&gt;&amp;nbsp;allows the computer to make decisions based on the values of variables which can take the specified action based on the input that is given.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the decision or condition is true then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/strong&gt;&amp;nbsp;will be executed. If the decision or condition is false then the code of block inside&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/strong&gt;&amp;nbsp;will be executed.&lt;/div&gt;
&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$num1=20;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$num2=30;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if ($num&amp;lt;$num2)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp;echo &quot;This line will show on browser&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;else&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;This line will not be shown on browser&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;This line will show on browser&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/7660956765361364862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-if-else-statement-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/7660956765361364862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/7660956765361364862'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-if-else-statement-tutorial.html' title='PHP If Else Statement Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5745959410712023745.post-3826548972492340549</id><published>2012-04-29T23:41:00.000-07:00</published><updated>2012-04-29T23:41:10.279-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP If Statement Tutorial"/><title type='text'>PHP If Statement Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;topic&quot; style=&quot;color: #7b0099; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
If Statement&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Syntax&lt;/strong&gt;&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if(condition)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;{&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// execute this block if condition is true&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Conditional statements are used to perform different actions based on different conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;1.&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;If statements&lt;/strong&gt;&amp;nbsp;are also known as conditional statements. This simply means that they are able to take action based on various conditions.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2.&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;If statements&lt;/strong&gt;&amp;nbsp;is used to check whether specified condition is true or false.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #006680; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If statements&lt;/strong&gt;&amp;nbsp;allows the computer to make decisions based on the values of variables which can take the specified action based on the input that is given.&lt;/div&gt;
&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 1&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$num1=20;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$num2=30;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if ($num1&amp;lt;$num2)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; echo &quot;This line will show on browser&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;This line will show on browser&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;div class=&quot;ans&quot; style=&quot;background-color: grey; border-bottom-color: rgb(255, 0, 0); border-bottom-style: inset; border-bottom-width: 2px; color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot;&gt;
&lt;div class=&quot;example&quot; style=&quot;font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Example: 2&lt;/div&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;?php&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$num1=20;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;$num2=30;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;if ($num2&amp;lt;$num1)&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp; echo &quot;This line will not show on browser&quot;;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;?&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; style=&quot;color: blue; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; font-weight: bold; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Output&lt;/div&gt;
&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;The browser will show nothing&lt;/span&gt;&lt;br style=&quot;color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;background-color: #edeff4; color: #333333; font-family: &#39;Comic Sans MS&#39;, Georgia, &#39;Times New Roman&#39;, serif; font-size: 12px; text-align: -webkit-auto;&quot;&gt;Because, the condition is false and 30 is greater than 20.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-aspell.blogspot.com/feeds/3826548972492340549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-if-statement-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3826548972492340549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5745959410712023745/posts/default/3826548972492340549'/><link rel='alternate' type='text/html' href='http://php-aspell.blogspot.com/2012/04/php-if-statement-tutorial.html' title='PHP If Statement Tutorial'/><author><name>Palash Mitra</name><uri>http://www.blogger.com/profile/03248059612872159003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>