<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PHP Forums - [TUTORIAL] How to make a simple calculator]]></title>
	<link rel="self" href="http://phpforums.org/feed-atom-topic15.xml"/>
	<updated>2009-11-17T20:54:26Z</updated>
	<generator>PunBB</generator>
	<id>http://phpforums.org/topic15-tutorial-how-to-make-a-simple-calculator.html</id>
		<entry>
			<title type="html"><![CDATA[Re: [TUTORIAL] How to make a simple calculator]]></title>
			<link rel="alternate" href="http://phpforums.org/post39.html#p39"/>
			<content type="html"><![CDATA[<p>That&#039;s simple enough and quick and easy, which is how I prefer it.&nbsp; Thanks so much for taking the time to share it.&nbsp; I needed a calculator code.</p>]]></content>
			<author>
				<name><![CDATA[Orrymain]]></name>
				<uri>http://phpforums.org/user16.html</uri>
			</author>
			<updated>2009-11-17T20:54:26Z</updated>
			<id>http://phpforums.org/post39.html#p39</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[TUTORIAL] How to make a simple calculator]]></title>
			<link rel="alternate" href="http://phpforums.org/post26.html#p26"/>
			<content type="html"><![CDATA[<p>Hello,</p><p>In this tutorial you will learn how to make a simple PHP calculator</p><div class="codebox"><pre><code>&lt;?php

if($submit)
{
   if($operator == &#039;*&#039;)
   {
       echo $numa * $numb;
   } elseif($operator == &#039;/&#039;)
   {
       echo $numa / $numb;
   } elseif($operator == &#039;+&#039;)
   {
       echo $numa + $numb;
   } elseif($operator == &#039;-&#039;)
   {
       echo $numa - $numb;
   }
} else { ?&gt;
&lt;form method=&quot;POST&quot; action=&quot;&lt;?php $_SERVER[&#039;PHP_SELF&#039;]; ?&gt;&quot;&gt;
 &lt;input type=&quot;text&quot; name=&quot;numa&quot; size=&quot;10&quot;&gt;
 &lt;select name=&quot;operator&quot;&gt;
 &lt;option value=&quot;+&quot;&gt;Add&lt;/option&gt;
 &lt;option value=&quot;-&quot;&gt;Subtract&lt;/option&gt;
 &lt;option value=&quot;*&quot;&gt;Multiply&lt;/option&gt;
 &lt;option value=&quot;/&quot;&gt;Divide&lt;/option&gt;
 &lt;/select&gt;
 &lt;input type=&quot;text&quot; name=&quot;numb&quot; size=&quot;10&quot;&gt;
 &lt;input type=&quot;submit&quot; value=&quot;Calculate&quot; name=&quot;submit&quot;&gt;
&lt;/form&gt;
&lt;?php } ?&gt;

Read more: http://www.webdesign.org/web/web-programming/php/php-calculator.10025.html#ixzz0TUVwwSds</code></pre></div>]]></content>
			<author>
				<name><![CDATA[jaydesigns]]></name>
				<uri>http://phpforums.org/user8.html</uri>
			</author>
			<updated>2009-10-10T01:15:03Z</updated>
			<id>http://phpforums.org/post26.html#p26</id>
		</entry>
</feed>
