<?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: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-9128457701363809118</id><updated>2011-11-28T04:50:11.837+05:30</updated><category term='For Statement'/><category term='PHP Forms'/><category term='What is PHP'/><category term='$_GET Variable'/><category term='Switch Statement'/><category term='First PHP Script'/><category term='Variables'/><category term='Operators'/><category term='Do while Statement'/><category term='Predefined variables'/><category term='while Statement'/><category term='Date function'/><category term='Statement'/><category term='$_POST Variable'/><category term='Functions'/><category term='Installation'/><category term='Variable'/><title type='text'>Basic Php Tutorials</title><subtitle type='html'>Basic PHP tutorials and for beginners..</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-5566123012762396509</id><published>2008-12-24T11:25:00.001+05:30</published><updated>2009-12-24T12:00:05.824+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Date function'/><title type='text'>Date() Functions</title><content type='html'>Php date function returns a formatted date string. Every call to a date/time function will generate &lt;span style="color: rgb(255, 0, 0);"&gt;a &lt;/span&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;tt class="constant"&gt;E_NOTICE&lt;/tt&gt;&lt;/b&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;,&lt;/span&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;tt class="constant"&gt; E_STRICT&lt;/tt&gt;&lt;/b&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;or&lt;/span&gt; &lt;/span&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;tt class="constant"&gt;E_WARNING&lt;/tt&gt;&lt;/b&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;  if the time zone is not valid.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;d - The day of the month (01 to 31)&lt;br /&gt;m -Month (01 to 12)&lt;br /&gt;Y - Year (in four digits)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic; color: rgb(153, 51, 0);"&gt;date(&lt;/span&gt;&lt;i style="font-style: italic; color: rgb(153, 51, 0);"&gt;format&lt;/i&gt;&lt;span style="font-style: italic; color: rgb(153, 51, 0);"&gt;,&lt;/span&gt;&lt;i style="font-style: italic; color: rgb(153, 51, 0);"&gt;timestamp&lt;/i&gt;&lt;span style="font-style: italic; color: rgb(153, 51, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0); font-style: italic;"&gt;echo date("Y M d", time());&lt;br /&gt;echo date("Y-M-d", time());&lt;br /&gt;echo date("Y / M / d", time());&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Output today formated date :  &lt;span style="font-style: italic; font-weight: bold;"&gt;2007 Dec 24&lt;/span&gt;, &lt;span style="font-style: italic; font-weight: bold;"&gt;2007-Dec-24  &lt;/span&gt;and &lt;span style="font-style: italic; font-weight: bold;"&gt;2007 / Dec /24&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To get the future date, i.e tommrow :&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;$tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y"));&lt;br /&gt;echo "Tomorrow is ".date("Y/m/d", $tomorrow);&lt;/blockquote&gt;&lt;blockquote style="color: rgb(153, 51, 0); font-style: italic;"&gt; &lt;/blockquote&gt;Output  : Tomorrow is 2007/12/25&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;To get a date  in the past or future dynamically is like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 153, 0); font-style: italic;"&gt;//get timestamp for past/future date I want&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-style: italic;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;$pf_time&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;strtotime(&lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;"-3 days"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;)&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0); font-style: italic;"&gt;//format the date using the timestamp generated&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-style: italic;"&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;$pf_date&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;date(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;"Y-m-d"&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 0);"&gt;$pf_time&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;)&lt;/span&gt;;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;gmdate() &lt;/span&gt;- Format a GMT/UTC date/time&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;idate() &lt;/span&gt;- Format a local time/date as integer&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;getdate() &lt;/span&gt;- Get date/time information&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;getlastmod()&lt;/span&gt; - Gets time of last page modification&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mktime()&lt;/span&gt; - Get Unix timestamp for a date&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;strftime() &lt;/span&gt;- Format a local time/date according to locale settings&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;time()&lt;/span&gt; - Return current Unix timestamp&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-5566123012762396509?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/5566123012762396509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=5566123012762396509' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5566123012762396509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5566123012762396509'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2008/12/date-functions.html' title='Date() Functions'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-35098810927067668</id><published>2006-04-30T13:07:00.002+05:30</published><updated>2008-12-09T10:48:37.611+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Variables'/><title type='text'>PHP Variables</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Using Php Variables&lt;/span&gt;&lt;br /&gt;Php Variables are are used for storing values, such as strings, numbers। Once stored they can be called from anywhere within the script। &lt;span style="color: rgb(51, 102, 102);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Note :Variables can not have spaces and only contain alpha-numeric characters and underscores.  &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 102);"&gt;$myVar &lt;span style="color: rgb(0, 0, 0);"&gt;or&lt;/span&gt; $my_Var &lt;span style="color: rgb(0, 0, 0);"&gt;both is correct.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 102);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjWgTRvc0YI/AAAAAAAAAJs/nxJiFeYR6GI/s1600-h/toolbar.gif"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjWgTRvc0YI/AAAAAAAAAJs/nxJiFeYR6GI/s320/toolbar.gif" alt="" id="BLOGGER_PHOTO_ID_5059126009461002626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Output of this script is : &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Hi Friend&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;Below is another example :&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjWiqRvc0ZI/AAAAAAAAAJ0/lohl7QS8SVs/s1600-h/ffff.gif"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjWiqRvc0ZI/AAAAAAAAAJ0/lohl7QS8SVs/s320/ffff.gif" alt="" id="BLOGGER_PHOTO_ID_5059128603621249426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Output of  is :&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2 + 2 is 4&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-35098810927067668?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/35098810927067668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=35098810927067668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/35098810927067668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/35098810927067668'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/04/php-variables.html' title='PHP Variables'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_T9VUfP1_UCw/RjWgTRvc0YI/AAAAAAAAAJs/nxJiFeYR6GI/s72-c/toolbar.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-5100158700837254348</id><published>2005-05-10T14:25:00.001+05:30</published><updated>2008-02-19T12:11:17.822+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Switch Statement'/><title type='text'>PHP Switch Statement</title><content type='html'>Php Switch statement is very useful, it works like if/else statement &amp; reduce the complication of numerous conditions in the script.&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;Syntax :&lt;br /&gt;&lt;/span&gt;&lt;blockquote  style="color: rgb(153, 0, 0);font-family:arial;"&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;switch (expression)&lt;br /&gt;{&lt;br /&gt;case 1&lt;br /&gt;code .. //execute code if expression = 1&lt;br /&gt;break;&lt;br /&gt;case 2&lt;br /&gt;code ... //execute code if expression = 2&lt;br /&gt;break;&lt;br /&gt;default:&lt;br /&gt;code...//execute code if expression not matched&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;Example :&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(204, 0, 0);"&gt;&lt;br /&gt;&lt;p style="color: rgb(153, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$value = 6;&lt;br /&gt;&lt;br /&gt;switch ($value)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;case 1:&lt;br /&gt;&lt;br /&gt;echo "Value 1";&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;case 2:&lt;br /&gt;&lt;br /&gt;echo "Value 2";&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;case 3:&lt;br /&gt;&lt;br /&gt;echo "Value 3";&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;default:&lt;br /&gt;&lt;br /&gt;echo "Value is " . $value . " not matched!";&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-5100158700837254348?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/5100158700837254348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=5100158700837254348' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5100158700837254348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5100158700837254348'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/php-switch-statement.html' title='PHP Switch Statement'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-4282722745677213146</id><published>2005-05-09T09:52:00.001+05:30</published><updated>2008-02-19T12:12:22.788+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='while Statement'/><category scheme='http://www.blogger.com/atom/ns#' term='Statement'/><title type='text'>The while Statement</title><content type='html'>&lt;h2&gt;The while Statement&lt;/h2&gt;The while statement is useful, when you want to loop a code until it's conditions are  met.&lt;pre  style="color: rgb(153, 51, 0);font-family:arial;"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Syntax :&lt;/span&gt;&lt;blockquote&gt;while (condition)&lt;br /&gt;code ....&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Example :&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;");}&lt;br /&gt;echo "Value is ". $val .". condition not met!&lt;br /&gt;";&lt;br /&gt;$val++;&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Output of this code is :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Value is 0. condition not met!&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 1. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 2. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 3. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 4. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 5. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 6. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 7. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 8. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 9. condition not met!&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Value is 10. condition met! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Above code loops until the value is 10.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-4282722745677213146?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/4282722745677213146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=4282722745677213146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/4282722745677213146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/4282722745677213146'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/while-statement.html' title='The while Statement'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-1959439200180495710</id><published>2005-05-08T10:39:00.001+05:30</published><updated>2008-02-19T12:13:24.019+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Do while Statement'/><category scheme='http://www.blogger.com/atom/ns#' term='Statement'/><title type='text'>The do while Statement</title><content type='html'>&lt;pre&gt;The do/While repeat through the code, until the condition is met.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;do&lt;br /&gt;{&lt;br /&gt;&lt;i&gt;code ...&lt;br /&gt;&lt;/i&gt;}&lt;br /&gt;while (&lt;i&gt;condition&lt;/i&gt;);&lt;/blockquote&gt;Example :&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;";&lt;br /&gt;}&lt;br /&gt;while ($val&lt;3);&gt;&lt;br /&gt;&lt;/blockquote&gt;Output of this code :&lt;br /&gt;&lt;br /&gt;Value is  1&lt;br /&gt;Value is  2&lt;br /&gt;Value is  3&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-1959439200180495710?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/1959439200180495710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=1959439200180495710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/1959439200180495710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/1959439200180495710'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/do-while-statement.html' title='The do while Statement'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-2961512307822562138</id><published>2005-05-07T10:49:00.001+05:30</published><updated>2008-02-19T12:14:57.244+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='For Statement'/><category scheme='http://www.blogger.com/atom/ns#' term='Statement'/><title type='text'>Php For Statement</title><content type='html'>&lt;pre&gt;PHP For statement is used when you want to loop the code for number of times,&lt;br /&gt;until condition is met.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;for (&lt;i&gt;initialization&lt;/i&gt;; &lt;i&gt;condition&lt;/i&gt;; &lt;i&gt;increment&lt;/i&gt;)&lt;br /&gt;{&lt;br /&gt;&lt;i&gt;code ...&lt;/i&gt;&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;for ($val=1; $val&amp;lt;=3; $val++)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;echo "This is the text.&amp;lt;br /&amp;gt;";&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Output of this Php code is :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;This is the text.&lt;br /&gt;This is the text.&lt;br /&gt;This is the text.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-2961512307822562138?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/2961512307822562138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=2961512307822562138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/2961512307822562138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/2961512307822562138'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/php-for-statement.html' title='Php For Statement'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-3334276676377576519</id><published>2005-05-06T10:59:00.001+05:30</published><updated>2008-02-19T12:15:22.807+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Functions'/><title type='text'>Php Functions</title><content type='html'>PHP functions are very useful, because once coded, it can be called from anywhere within the script or from outside. Note, code block must start with &lt;span style="color: rgb(204, 102, 0);"&gt;function &lt;span style="color: rgb(0, 0, 0);"&gt;word.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example 1&lt;/span&gt; : Shows how to call function within the php Script.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;function MyFirstEchoFunction()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;echo "Hi this is the function called! &amp;lt;br /&amp;gt;";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;echo "And this is text created by function!";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;p style="color: rgb(153, 51, 0);"&gt;MyFirstEchoFunction()&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="color: rgb(153, 51, 0);"&gt;&lt;/p&gt;Another way of calling &lt;span style="color: rgb(153, 51, 0);"&gt;functions&lt;/span&gt; is using &lt;span style="color: rgb(153, 51, 0);"&gt;include()&lt;span style="color: rgb(0, 0, 0);"&gt;..&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Php &lt;/span&gt;Include() &lt;/span&gt;lets you import any php or text file in your script.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Example 2&lt;/span&gt; : Create a php file somthing like "&lt;span style="color: rgb(153, 51, 0);"&gt;test.php&lt;/span&gt;" and write this code:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0); font-style: italic;"&gt;test.php&lt;/span&gt; code :&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;function MyFirstEchoFunction()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;echo "Hi this is the function called! &amp;lt;br /&amp;gt;";&lt;br /&gt;&lt;br /&gt;echo "And this is text created by function!";&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;MyFirstEchoFunction()&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now create destination file, something like "&lt;span style="color: rgb(153, 51, 0);"&gt;call.php&lt;/span&gt;"&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Call.php &lt;/span&gt;code :&lt;br /&gt;&lt;/p&gt;&lt;p style="color: rgb(153, 51, 0);"&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p style="color: rgb(153, 51, 0);"&gt;&lt;/p&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;include("test.php"); &lt;span style="color: rgb(0, 153, 0);"&gt;//This is the target php file&lt;/span&gt;&lt;br /&gt;&lt;p&gt;MyFirstEchoFunction() &lt;span style="color: rgb(0, 153, 0);"&gt;//We just called the function coded in test.php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;Isn't this nice? The output of this file is :&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);font-size:85%;" &gt;Hi this is the function called!&lt;br /&gt;And this is text created by function!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-3334276676377576519?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/3334276676377576519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=3334276676377576519' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3334276676377576519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3334276676377576519'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/php-functions.html' title='Php Functions'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-6524127616117459395</id><published>2005-05-05T11:50:00.001+05:30</published><updated>2008-12-09T10:48:38.033+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Forms'/><title type='text'>PHP Forms</title><content type='html'>This is the fun part! sooner or later, we all want to collect user data. We can build nifty data collector using HTML  and PHP &lt;a href="http://phpstreet.blogspot.com/2007/05/php-predefined-variables.html"&gt;GET/POST&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;Create a HTML form Something like.. Easier if you do it in HTML editor. and name it  "myform.html"&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);font-size:85%;" &gt;&lt;blockquote&gt;&amp;lt;form name="form1" method="post" action="collect.php"&amp;gt;&lt;br /&gt;Name :&lt;br /&gt;&amp;lt;input type="text" name="name"&amp;gt;&lt;br /&gt;&amp;lt;br&amp;gt;&lt;br /&gt;Email :&lt;br /&gt;&amp;lt;input type="text" name="email"&amp;gt;&lt;br /&gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type="submit" name="Submit" value="Submit"&amp;gt;&lt;br /&gt;&amp;lt;/form&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;Now Create another file, this time "collect.php"&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;echo $_POST["name"] ."&amp;lt;br /&amp;gt;";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;echo $_POST["email"];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;That's it... After collecting user information, you can do whatever you want In "collect.php" , send email.. send data to database, evaluate.. or just flush it.. etc&lt;br /&gt;&lt;br /&gt;See the output :&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0); font-style: italic;"&gt;myform.html :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjgyShvc0rI/AAAAAAAAAMw/hZL8SZ-hLDs/s1600-h/form.gif"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjgyShvc0rI/AAAAAAAAAMw/hZL8SZ-hLDs/s320/form.gif" alt="" id="BLOGGER_PHOTO_ID_5059849475227177650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0); font-style: italic;"&gt;collect.php  : &lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjgyShvc0sI/AAAAAAAAAM4/KsaXsKXAB8A/s1600-h/collect.gif"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_T9VUfP1_UCw/RjgyShvc0sI/AAAAAAAAAM4/KsaXsKXAB8A/s320/collect.gif" alt="" id="BLOGGER_PHOTO_ID_5059849475227177666" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-6524127616117459395?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/6524127616117459395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=6524127616117459395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/6524127616117459395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/6524127616117459395'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/html-forms-php-out.html' title='PHP Forms'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_T9VUfP1_UCw/RjgyShvc0rI/AAAAAAAAAMw/hZL8SZ-hLDs/s72-c/form.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-3628814104491295347</id><published>2005-05-04T12:20:00.001+05:30</published><updated>2008-02-19T12:18:46.470+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Predefined variables'/><title type='text'>PHP Predefined variables</title><content type='html'>PHP provides a large number of predefined variables to any script     which it runs. Many of these variables,      From version 4.1.0 onward, PHP provides an additional set of predefined arrays     containing variables from the web server (if applicable), the     environment, and user input. These new arrays are rather special     in that they are automatically global--i.e., automatically     available in every scope. For this reason, they are often known as     "superglobals".&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;PHP Superglobals&lt;/b&gt;&lt;/p&gt;&lt;dl&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$GLOBALS&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Contains a reference to every variable which is currently        available within the global scope of the script. The keys of        this array are the names of the global variables.        &lt;var&gt;$GLOBALS&lt;/var&gt; has existed since PHP 3.&lt;/dd&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_SERVER&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables set by the web server or otherwise directly related        to the execution environment of the current script. Analogous        to the old &lt;var&gt;$HTTP_SERVER_VARS&lt;/var&gt; array (which is        still available, but deprecated).&lt;/dd&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_GET&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables provided to the script via URL query string. Analogous to the        old &lt;var&gt;$HTTP_GET_VARS&lt;/var&gt; array (which is still        available, but deprecated).&lt;/dd&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_POST&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables provided to the script via HTTP POST. Analogous to the        old &lt;var&gt;$HTTP_POST_VARS&lt;/var&gt; array (which is still        available, but deprecated).&lt;/dd&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_COOKIE&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables provided to the script via HTTP cookies. Analogous to        the old &lt;var&gt;$HTTP_COOKIE_VARS&lt;/var&gt; array (which is        still available, but deprecated).&lt;/dd&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_FILES&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables provided to the script via HTTP post file        uploads. Analogous to the old        &lt;var&gt;$HTTP_POST_FILES&lt;/var&gt; array (which is still        available, but deprecated). See POST method         uploads for more information.&lt;/dd&gt;&lt;dt style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_ENV&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables provided to the script via the environment. Analogous        to the old &lt;var&gt;$HTTP_ENV_VARS&lt;/var&gt; array (which is        still available, but deprecated).&lt;/dd&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_REQUEST&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;        Variables provided to the script via the GET, POST, and COOKIE input        mechanisms, and which therefore cannot be trusted. The presence and        order of variable inclusion in this array is defined according to the        PHP variables_order        configuration directive. This array has no direct analogue in versions        of PHP prior to 4.1.0.  See also         import_request_variables().       &lt;/p&gt;&lt;div class="caution"&gt;&lt;b class="caution"&gt;Caution&lt;/b&gt;&lt;p&gt;         Since PHP 4.3.0, FILE information from &lt;var&gt;$_FILES&lt;/var&gt; does         not exist in &lt;var&gt;$_REQUEST&lt;/var&gt;.        &lt;/p&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;p&gt;&lt;b&gt;Note: &lt;/b&gt;         When running on the command line         , this will &lt;span class="emphasis"&gt;&lt;em&gt;not&lt;/em&gt;&lt;/span&gt; include the          &lt;var&gt;argv&lt;/var&gt; and &lt;var&gt;argc&lt;/var&gt; entries; these are          present in the &lt;var&gt;$_SERVER&lt;/var&gt; array.        &lt;/p&gt;&lt;/blockquote&gt;&lt;/dd&gt;&lt;dt style="font-weight: bold;"&gt;&lt;span class="term"&gt;$_SESSION&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;        Variables which are currently registered to a script's        session. Analogous to the old        &lt;var&gt;$HTTP_SESSION_VARS&lt;/var&gt; array (which is still        available, but deprecated).        &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-3628814104491295347?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/3628814104491295347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=3628814104491295347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3628814104491295347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3628814104491295347'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/php-predefined-variables.html' title='PHP Predefined variables'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-5794056583573272732</id><published>2005-05-03T12:37:00.001+05:30</published><updated>2008-02-19T12:19:24.728+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='$_GET Variable'/><category scheme='http://www.blogger.com/atom/ns#' term='Variable'/><title type='text'>Php $_GET Variable</title><content type='html'>&lt;p&gt;php $_GET variable is a predefined php variable name, and values are sent by the HTTP GET method. Get method is not so profound, and the amount of data can be sent is max 100 characters, it displays data (including passwords and usernames) in user's browser address bar, Also makes it vulnerable to SQL injections (Kind of My SQL exploitation done by typing characters in address bar) .&lt;/p&gt;&lt;br /&gt;However it is useful, when you want to point to a particular page to retrive data...&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);font-size:85%;" &gt;&amp;lt;a href="http://www.somesite.com/get_some_data.php?name=sandy&amp;gt;sandy's data&amp;lt;/a&amp;gt; &lt;/span&gt;&lt;/blockquote&gt;&lt;span style="color: rgb(153, 51, 0);font-size:85%;" &gt;&lt;/span&gt;            Or collect Data from HTML form&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&amp;lt;form name="someform" method="&lt;span style="color: rgb(0, 153, 0); font-style: italic;"&gt;GET&lt;/span&gt;" action="toSomePhpFile.php"&amp;gt; &lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Example :&lt;br /&gt;&lt;br /&gt;"&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(0, 153, 0);"&gt;myform.html&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;":&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&amp;lt;form action="collect.php" method="&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;GET&lt;/span&gt;"&amp;gt;&lt;br /&gt;Name: &amp;lt;input type="text" name="name" /&amp;gt;&lt;br /&gt;Email: &amp;lt;input type="text" name="email" /&amp;gt;&lt;br /&gt;&amp;lt;input type="submit" /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;"&lt;span style="color: rgb(0, 153, 0);"&gt;collect.php&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;&amp;lt;? php&lt;br /&gt;echo $_GET["name"] .&amp;lt;br /&amp;gt;";&lt;br /&gt;echo $_GET["email"] . "years old! ";&lt;br /&gt;?&amp;gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;When user clicks submit button, it will look like this in address bar on the browser.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre style="color: rgb(204, 102, 0);"&gt;http://www.somesite.com/welcome.php?name=sandy&amp;amp;email=sandy@yahoo.com&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-5794056583573272732?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/5794056583573272732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=5794056583573272732' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5794056583573272732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5794056583573272732'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/php-get-variable.html' title='Php $_GET Variable'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-6738606583716836902</id><published>2005-05-02T13:06:00.001+05:30</published><updated>2008-02-19T12:20:08.421+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='$_POST Variable'/><category scheme='http://www.blogger.com/atom/ns#' term='Variable'/><title type='text'>Php $_POST Variable</title><content type='html'>PGP $_POST variable is a predefined php variable name, and values are sent by the HTTP POST method, exactly like $_GET variable, but data sent from a form with $_POST method is invisible to user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;"myform.html":&lt;br /&gt;&lt;p style="color: rgb(153, 51, 0);"&gt;&lt;/p&gt;&lt;blockquote style="color: rgb(153, 0, 0);"&gt; &amp;lt;form action="collect.php" method="&lt;span style="color: rgb(0, 153, 0);"&gt;POST&lt;/span&gt;"&amp;gt;&lt;br /&gt;Name: &amp;lt;input type="text" name="name" /&amp;gt;&lt;br /&gt;Email: &amp;lt;input type="text" name="email" /&amp;gt;&lt;br /&gt;&amp;lt;input type="submit" /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;"collect.php"&lt;/p&gt;&lt;blockquote style="color: rgb(153, 0, 0);"&gt;&amp;lt;? php&lt;br /&gt;echo $_POST["name"] ."&amp;lt;br /&amp;gt;";&lt;br /&gt;echo $_POST["email"] ;&lt;br /&gt;?&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;With POST method you can send any amount of data from the HTML form. It is useful when you want to collect... large text, passwords etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-6738606583716836902?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/6738606583716836902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=6738606583716836902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/6738606583716836902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/6738606583716836902'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/05/php-post-variable.html' title='Php $_POST Variable'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-7038901015511757329</id><published>2005-04-15T09:40:00.001+05:30</published><updated>2008-02-19T12:20:44.063+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is PHP'/><title type='text'>What is Php</title><content type='html'>Php &lt;span style=""&gt;is a server-side HTML embedded scripting language,&lt;/span&gt; for creating dynamic websites, it is free and provides full suite &lt;span style=""&gt;of tools to developers for building dynamic websites&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.php.net/www.php.net/images/php.gif"&gt;&lt;img style="cursor: pointer; width: 123px; height: 68px;" src="http://static.php.net/www.php.net/images/php.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Php stands for PHP: Hypertext preprocessor and it's Open Source Software (OOS)&lt;/li&gt;&lt;li&gt;Php scripts are executed on the server, Which means users can not see code source from their browser.&lt;/li&gt;&lt;li&gt;Php supports many powerful databases such as  &lt;a href="http://mysql.com/"&gt;MySQL&lt;/a&gt;, &lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt;,  &lt;a href="http://www.sybase.com/"&gt;Sybase&lt;/a&gt;, &lt;a href="http://www.solidtech.com/"&gt;Solid&lt;/a&gt; etc.&lt;/li&gt;&lt;li&gt;Php is server-side scription language, simile to ASP.&lt;/li&gt;&lt;li&gt;The main thing about Php is that, it is free to &lt;a href="http://www.php.net/downloads.php"&gt;download&lt;/a&gt; and use.&lt;/li&gt;&lt;li&gt;PHP runs on diffrent platforms (Windows, Linux, Unix, etc) and it's compatible with almost all servers used today.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Before you should learn Php, you must know few basic knowledge about  HTML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-7038901015511757329?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/7038901015511757329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=7038901015511757329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/7038901015511757329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/7038901015511757329'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/04/what-is-php.html' title='What is Php'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-5795703332850646080</id><published>2005-04-14T10:02:00.005+05:30</published><updated>2009-12-24T11:10:05.176+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><title type='text'>Install Php on Windows</title><content type='html'>&lt;span&gt;I have been using &lt;a href="http://www.wampserver.com/en/download.php" target="_new"&gt;WampServer&lt;/a&gt; for a while, and it's an excellent piece of program, it comes bundled with MySQL, PHP 5, phpMyAdmin and Apache server. I strongly recommend that you use it. If still you want to go lengthy way, go on reading.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;How to Install PHP on Windows IIS.&lt;/span&gt;&lt;br /&gt;Please remmember PHP      will not work on 16 bit platforms such as Windows 3.1. There are many ways you can install php in your windows.  You can refer to  &lt;a href="http://www.php-mysql-tutorial.com/install-apache-php-mysql.php"&gt;This site&lt;/a&gt;  that shows you nicely how to install  Php, MySQL and Apache Server. Or you can follow PHP &lt;a href="http://www.php.net/manual/en/install.windows.iis.php"&gt;online guide&lt;/a&gt; to installation, which covers everything.&lt;br /&gt;&lt;br /&gt;First Go to &lt;a href="http://www.php.net/downloads.php"&gt;Php Download page&lt;/a&gt; and download a Windows Binaries package. You can choose php  package with installer for automated installation or Zipped package for manual installation.&lt;br /&gt;I've choosen to download &lt;a href="http://www.php.net/get/php-4.4.6-Win32.zip/from/a/mirror"&gt;PHP 4.4.6 zip package&lt;/a&gt; , You can choose newer ones, i.e php 5.x, which are now more reliable and has less bugs...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Windows NT/200x/XP and IIS 4 or newer&lt;/span&gt;&lt;br /&gt;Where to find IIS? Well that's a common question. Go to &lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;Control panel &gt; Administrative Tools &gt; Internet Information Services&lt;/span&gt;. If you can not find it, that means you haven't installed it. To Install it, Put &lt;span style="font-weight: bold;"&gt;Windows CD&lt;/span&gt;, which is distributed with your computer, else you can ask your vendor for that.   &lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;go to Control Panel &gt; Add/Remove Programs &gt; Add/Remove Windows Components &gt; Check "Internet Information Services (IIS)"&lt;/span&gt;, Which is approximately  15 MB in Size. Click details if you want to install additional services else click Next to start Installation.&lt;br /&gt;&lt;br /&gt;Now extract Zipped Php Binaries package to a folder, usually C:\PHP , Avoid folders that contain long names, spaces or bad file names, such as "C:\my Php #$files here" . and do not mess with PHP file &lt;a href="http://in.php.net/manual/en/install.windows.manual.php"&gt;structure&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Go to &lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;Control panel &gt; Administrative Tools &gt; Internet Information Services&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Click to open IIS manager, Right click on "&lt;span style="font-style: italic; color: rgb(153, 0, 0);"&gt;Default Web site" &gt; Properties&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Under 'Home Directory', 'Virtual Directory', or 'Directory', do the        following: &lt;/li&gt;&lt;li&gt;Change the Execute Permissions to 'Scripts only'&lt;/li&gt;&lt;li&gt;Click on the 'Configuration' button, and choose the Application Mappings        tab. &lt;/li&gt;&lt;li&gt;Click Add and set the Executable path to the appropriate CGI file.       &lt;/li&gt;&lt;li&gt;An example PHP 4 value is: &lt;var&gt;C:\php\php.exe&lt;/var&gt;       Supply &lt;var&gt;.php&lt;/var&gt; as the extension. &lt;/li&gt;&lt;li&gt;Leave 'Method        exclusions' blank, and check the 'Script engine' checkbox. Now, click        OK a few times.      &lt;/li&gt;&lt;/ul&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;       Set up the appropriate security. (This is done in Internet       Service Manager), and if your NT Server uses NTFS file system,       add execute rights for I_USR_ to the directory that contains       &lt;var&gt;php.exe&lt;/var&gt; / &lt;var&gt;php-cgi.exe&lt;/var&gt;.      &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWDlxvc0TI/AAAAAAAAAJE/IomT6lHLnHk/s1600-h/toolbar.gif"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWDlxvc0TI/AAAAAAAAAJE/IomT6lHLnHk/s320/toolbar.gif" alt="" id="BLOGGER_PHOTO_ID_5059094441451376946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Click Play button on the toolbard to start Internet Information Services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-5795703332850646080?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/5795703332850646080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=5795703332850646080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5795703332850646080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/5795703332850646080'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/04/install-php-on-iis.html' title='Install Php on Windows'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWDlxvc0TI/AAAAAAAAAJE/IomT6lHLnHk/s72-c/toolbar.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-3672703193547204692</id><published>2005-04-13T11:40:00.001+05:30</published><updated>2008-12-09T10:48:38.551+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='First PHP Script'/><title type='text'>First PHP Script</title><content type='html'>&lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;b&gt;Hello World php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is the most common thing you do when you learning PHP. first and foremost you need to know that php blocks starts with . Similar to Html &lt;b&gt;Hello&lt;/b&gt; Which makes Text bold like this &lt;b&gt;Hello. &lt;/b&gt;Php blocks can be placed anywhere in your Web documents, aslong as your your php file is .php extension.&lt;br /&gt;&lt;br /&gt;Let's create our first php file. Open test editor such as Notepad.. or any other web editor programs such as dreamweaver. but avoid using MS word for god sake... duh!&lt;br /&gt;Now write the following document.  &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: 0.5in; margin-bottom: 12pt; margin-left: 0.5in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWV4xvc0UI/AAAAAAAAAJM/qDkROs7VACo/s1600-h/toolbar.gif"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWV4xvc0UI/AAAAAAAAAJM/qDkROs7VACo/s320/toolbar.gif" alt="" id="BLOGGER_PHOTO_ID_5059114559078191426" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-style: italic;"&gt;By the way.. codes above are in gif image format! Just because i don't want you to copy and paste codes in your text editor, you need to type everything yourself.&lt;/span&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;Save this file as "hello.php" and upload or place it in your testing folder or your web sever.&lt;br /&gt;To execute this script, type something like this in your browser address bar :&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="color:red;"&gt;http://www.yoursite.com/testfolder/hello.php&lt;/span&gt;&lt;br /&gt;or if it's in your local site :&lt;br /&gt;&lt;span style="color:red;"&gt;http://localhost/testfolder/hello.php&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color:black;"&gt;Adding comments on the Code&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;Adding comments on your php code is a good habit, this way you'll always keep track of bugs &amp; errors that continue to show up all the time in developers browser.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: 0.5in; margin-bottom: 12pt; margin-left: 0.5in;"&gt; &lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWXBxvc0VI/AAAAAAAAAJU/5OojAF5fzHE/s1600-h/toolbar.gif"&gt;&lt;blockquote&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWXBxvc0VI/AAAAAAAAAJU/5OojAF5fzHE/s320/toolbar.gif" alt="" id="BLOGGER_PHOTO_ID_5059115813208641874" border="0" /&gt;&lt;/blockquote&gt;&lt;/a&gt;&lt;p class="MsoNormal"&gt;Go on test it.. you'll not see those comment lines or blocks on the code.&lt;br /&gt;This comment lines are commonly used by all php developers, because it reduces the complexity of the code. Imagine 1000 lines of php code without comments on it.. it would be difficult task for developers to locate the bugs.. with comments on it, it is easy to figure out, what went wrong.&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;Well that's it, we will talk about if and else statements on next chapter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if !supportEmptyParas]--&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-3672703193547204692?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3672703193547204692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3672703193547204692'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/04/first-php-script.html' title='First PHP Script'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_T9VUfP1_UCw/RjWV4xvc0UI/AAAAAAAAAJM/qDkROs7VACo/s72-c/toolbar.gif' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-3944809908537986003</id><published>2005-04-12T13:06:00.001+05:30</published><updated>2008-02-19T12:23:10.999+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Operators'/><title type='text'>PHP Operators</title><content type='html'>&lt;b&gt;PHP Operators&lt;br /&gt;&lt;/b&gt;Below listed in the tables are the php operators, it is important that you memorize at least few of them.&lt;o:p&gt;&lt;/o:p&gt;  &lt;p&gt;&lt;b&gt;Arithmetic Operators&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;table style="width: 353.25pt;" border="1" cellpadding="0" cellspacing="0" width="471"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td style="padding: 0.75pt; width: 15%;" width="15%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Operator&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 40%;" width="40%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 25%;" width="25%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 20%;" width="20%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Result&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;+&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Addition&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=2&lt;br /&gt;x+2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;-&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Subtraction&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=2&lt;br /&gt;5-x&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;*&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Multiplication&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=4&lt;br /&gt;x*5&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;/&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Division&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;15/5&lt;br /&gt;5/2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;3&lt;br /&gt;2.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;%&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Modulus (division remainder)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5%2&lt;br /&gt;10%8&lt;br /&gt;10%2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;1&lt;br /&gt;2&lt;br /&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;++&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Increment&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=5&lt;br /&gt;x++&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=6&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;--&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;Decrement&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=5&lt;br /&gt;x--&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=4&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;Assignment Operators&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;table style="width: 354pt;" border="1" cellpadding="0" cellspacing="0" width="472"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td style="padding: 0.75pt; width: 15%;" width="15%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Operator&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 40%;" width="40%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 45%;" width="45%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Is The Same As&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;+=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x+=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=x+y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;-=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x-=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=x-y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;*=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x*=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=x*y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;/=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x/=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=x/y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;%=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x%=y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=x%y&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;Comparison Operators&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;table style="width: 355.5pt;" border="1" cellpadding="0" cellspacing="0" width="474"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td style="padding: 0.75pt; width: 15%;" width="15%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Operator&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 40%;" width="40%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 45%;" width="45%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;==&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;is equal to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5==8 returns false&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;!=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;is not equal&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5!=8 returns true&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;is greater than&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5&gt;8 returns false&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;is less than&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5&lt;8&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&gt;=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;is greater than or equal to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5&gt;=8 returns false&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;=&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;is less than or equal to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;5&lt;=8 returns true&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;Logical Operators&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;table style="width: 355.5pt;" border="1" cellpadding="0" cellspacing="0" width="474"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td style="padding: 0.75pt; width: 15%;" width="15%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Operator&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 40%;" width="40%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt; width: 45%;" width="45%"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&amp;&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;and&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=6&lt;br /&gt;y=3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;p&gt;(x &lt;&gt; 1) returns true&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;||&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;or&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=6&lt;br /&gt;y=3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;p&gt;(x==5 || y==5) returns false&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;!&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;not&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;x=6&lt;br /&gt;y=3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;p&gt;!(x==y) returns true&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-3944809908537986003?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpstreet.blogspot.com/feeds/3944809908537986003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9128457701363809118&amp;postID=3944809908537986003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3944809908537986003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/3944809908537986003'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/04/php-operators.html' title='PHP Operators'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9128457701363809118.post-8563237523495657078</id><published>2005-04-11T14:20:00.000+05:30</published><updated>2007-05-02T13:23:03.891+05:30</updated><title type='text'>Php IF &amp; ELSE</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Php IF &amp; ELSE Statemments&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Php if, else statements in PHP can perform different actions, based on different conditions.&lt;br /&gt;That means, sometimes you may want to show "&lt;span style="font-style: italic;"&gt;bye, have a nice day&lt;/span&gt;" instead of "&lt;span style="font-style: italic;"&gt;hello how are you?&lt;/span&gt;" in user's browser.&lt;br /&gt;&lt;br /&gt;syntax :&lt;br /&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;if (condition)&lt;br /&gt;Code.....&lt;br /&gt;else&lt;br /&gt;Code.....&lt;/blockquote&gt;Example :&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;$val = 1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;If ($val == 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;echo "value is one";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;echo "value is not one";&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PHP IF &amp; ELSEIF Statements.&lt;/span&gt;&lt;br /&gt;Php elseif Statements is same as elseif statements. But this time you can extend the limit of your conditions.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;pre style="font-family: courier new;"&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;if (condition)&lt;br /&gt;code ...&lt;br /&gt;elseif (condition)&lt;br /&gt;code ...&lt;br /&gt;elseif (condition)&lt;br /&gt;code...&lt;br /&gt;else&lt;/blockquote&gt;Code :&lt;i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;/pre&gt;&lt;blockquote style="color: rgb(153, 51, 0);"&gt;If ($val = 1)&lt;br /&gt;&lt;br /&gt;echo "value is one";&lt;br /&gt;elseif ($val == 2)&lt;br /&gt;echo "value is two";&lt;br /&gt;elseif ($val == 3)&lt;br /&gt;echo "value is three";&lt;br /&gt;else&lt;br /&gt;echo "value is unknown";&lt;/blockquote&gt;Output of above code is :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;value is three&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9128457701363809118-8563237523495657078?l=phpstreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/8563237523495657078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9128457701363809118/posts/default/8563237523495657078'/><link rel='alternate' type='text/html' href='http://phpstreet.blogspot.com/2007/04/php-if-else.html' title='Php IF &amp; ELSE'/><author><name>skm_daddy</name><uri>http://www.blogger.com/profile/07949813986651457908</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
