<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vacation Rentals Advertising and Marketing &#187; php operators</title>
	<atom:link href="http://www.goweb99.com/blog/tag/php-operators/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goweb99.com/blog</link>
	<description>Vacation Rentals Solution &#124; Vacation Rentals Websites &#124; Vacation Rentals Network</description>
	<lastBuildDate>Thu, 03 Feb 2011 22:23:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Combining Arithmetic &amp; Assignment Operators</title>
		<link>http://www.goweb99.com/blog/php-tutorial/combining-arithmetic-assignment-operators/</link>
		<comments>http://www.goweb99.com/blog/php-tutorial/combining-arithmetic-assignment-operators/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 09:45:21 +0000</pubDate>
		<dc:creator>tutor</dc:creator>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php operators]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[PHP Tuts]]></category>

		<guid isPermaLink="false">http://www.goweb99.com/blog/?p=434</guid>
		<description><![CDATA[We often need to increment a variable by a fixed amount. For eg a variable which is being used to count something, may be a counter for a loop or some other purpose, we need to constantly increment it by 1. $count = $count + 1; However, there is another way for doing this. $counter [...]]]></description>
			<content:encoded><![CDATA[<p>We often need to increment a variable by a fixed amount. For eg a variable which is being used to count something, may be a counter for a loop or some other purpose, we need to constantly increment it by 1.</p>
<ul> $count = $count + 1;</ul>
<p>However, there is another way for doing this.</p>
<ul> $counter += 1;</ul>
<p>This combined assignment/arithmetic operator would accomplish the same task as the above code.</p>
<p>Although this combined operator shortens the code but sometimes for those who are not accustomed to such programming constructs, this may create confusion and may make the code unreadable.0</p>
<ul>
<table border="0" width="100%">
<tbody>
<tr>
<td>Operator</td>
<td>Description</td>
<td>Example</td>
<td>Expanded Form</td>
</tr>
<tr>
<td>+=</td>
<td>Plus Equals</td>
<td>$x += 2;</td>
<td>$x = $x + 2;</td>
</tr>
<tr>
<td>-=</td>
<td>Minus Equals</td>
<td>$x -= 4;</td>
<td>$x = $x &#8211; 4;</td>
</tr>
<tr>
<td>*=</td>
<td>Multiply Equals</td>
<td>$x *= 3;</td>
<td>$x = $x * 3;</td>
</tr>
<tr>
<td>/=</td>
<td>Divide Equals</td>
<td>$x /= 2;</td>
<td>$x = $x / 2;</td>
</tr>
<tr>
<td>%=</td>
<td>Modulo Equals</td>
<td>$x %= 5;</td>
<td>$x = $x % 5;</td>
</tr>
<tr>
<td>.=</td>
<td>Concatenate Equals</td>
<td>$my_str.=&#8221;PHP&#8221;;</td>
<td>$my_str = $my_str .&#8221;PHP&#8221;;</td>
</tr>
</tbody>
</table>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.goweb99.com/blog/php-tutorial/combining-arithmetic-assignment-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Operators</title>
		<link>http://www.goweb99.com/blog/php-tutorial/php-operators/</link>
		<comments>http://www.goweb99.com/blog/php-tutorial/php-operators/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 08:04:15 +0000</pubDate>
		<dc:creator>tutor</dc:creator>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php arithmetic]]></category>
		<category><![CDATA[php assignment]]></category>
		<category><![CDATA[php comparison]]></category>
		<category><![CDATA[php operators]]></category>
		<category><![CDATA[php string operator]]></category>
		<category><![CDATA[PHP Tuts]]></category>

		<guid isPermaLink="false">http://www.goweb99.com/blog/?p=412</guid>
		<description><![CDATA[Operators are used to manipulate the values or directly or to operate on variables to manipulate values. All the operators are categorized under the following: Assignment Operators Arithmetic Operators Comparison Operators String Operators This section lists the different operators available in PHP. Assignment Operators Assignment operators assign a value to a variable, or the value [...]]]></description>
			<content:encoded><![CDATA[<p>Operators are used to manipulate the values or directly or to operate on variables to manipulate values.</p>
<p>All the operators are categorized under the following:</p>
<ul>
<li>Assignment Operators</li>
<li>Arithmetic Operators</li>
<li>Comparison Operators</li>
<li>String Operators</li>
</ul>
<p>This section lists the different operators available in PHP.</p>
<p><strong>Assignment Operators</strong></p>
<p>Assignment operators assign a value to a variable, or the value of a variable to another variable.</p>
<div class="example">$my_var = 4;<br />
$another_var = $my_var;</div>
<p>Now both $my_var and $another_var contain the value 4.</p>
<p>Assignments can also be used in conjunction with arithmetic operators, which we will be studying later in this tutorial.</p>
<p><strong>Arithmetic Operators</strong></p>
<ul>
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td><strong>Operator</strong></td>
<td><strong>Description</strong></td>
<td><strong>Example</strong></td>
</tr>
<tr>
<td>+</td>
<td>Addition</td>
<td>2 + 4</td>
</tr>
<tr>
<td>-</td>
<td>Subtraction</td>
<td>6-2</td>
</tr>
<tr>
<td>*</td>
<td>Multiplication</td>
<td>5*3</td>
</tr>
<tr>
<td>/</td>
<td>Division</td>
<td>15/3</td>
</tr>
<tr>
<td>%</td>
<td>Modulus</td>
<td>43%10</td>
</tr>
</tbody>
</table>
</ul>
<div class="example">$addition= 2+3;<br />
$subtraction= 3-2;<br />
$multiplication= 2*3;<br />
$division= 22/11;<br />
$modulus = 5 % 2;</div>
<p><strong>Comparison Operators</strong></p>
<p>Comparison Operators are used to compare the values of two operators. These operators are used inside conditional statements and evaluate to either true or false. PHP provides all the comparison operators that are provided by other programming language.<br />
Assume: $x = 4 and $y = 5;</p>
<ul>
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td><strong>Operator</strong></td>
<td><strong>Description</strong></td>
<td><strong>Example</strong></td>
<td><strong>Result</strong></td>
</tr>
<tr>
<td>==</td>
<td>Equal To</td>
<td>$x == $y</td>
<td>false</td>
</tr>
<tr>
<td>!=</td>
<td>Not Equal To</td>
<td>$x != $y</td>
<td>true</td>
</tr>
<tr>
<td>&lt;</td>
<td>Less Than</td>
<td>$x &lt; $y</td>
<td>true</td>
</tr>
<tr>
<td>&gt;</td>
<td>Greater Than</td>
<td>$x &gt; $y</td>
<td>false</td>
</tr>
<tr>
<td>&lt;=</td>
<td>Less Than or Equal To</td>
<td>$x &lt;= $y</td>
<td>true</td>
</tr>
<tr>
<td>&gt;=</td>
<td>Greater Than or Equal To</td>
<td>$x &gt;= $y</td>
<td>false</td>
</tr>
</tbody>
</table>
</ul>
<p><strong>String Operators</strong></p>
<p>As we have learned before the dot operator is used to concatenate or join two strings.</p>
<div class="example">$a_string=”Hello”;<br />
$b_string=”  Tutor”;<br />
$new_string=$a_string . $_string;<br />
Echo $new_string;</div>
<div class="example">Output</p>
<p>Hello Tutor</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.goweb99.com/blog/php-tutorial/php-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

