title: What is difference between , (comma) and . (dot) as a concatenation operator?
body: <p>Here is simple PHP code</p>
  
  <pre><code>echo '&lt;form method="POST" action="calcbyme.php"&gt;&lt;/br&gt;
      enter value1 :&lt;input type="text" name="f1"&gt;&lt;/br&gt;
      give operator :&lt;input type="text" name="op"&gt;&lt;/br&gt;
      enter value2 :&lt;input type="text" name="f2"&gt;&lt;/br&gt;
      &lt;input type="submit" value="calculate"&gt;&lt;/br&gt;';
      if(isset( $_POST["f1"]) &amp;&amp; isset($_POST["f2"]) &amp;&amp; isset($_POST["op"]) ){
          $a=$_POST["f1"];
          $b=$_POST["f2"];
          $op=$_POST["op"];
          switch ($op){
              case '+':
                  echo "$a+$b=". $a+$b; break;
              case '-':
                  echo  "$a-$b=". $a-$b; break;
              case '*':
                  echo "$a*$b=". $a*$b; break;
              case '/';
                  echo "$a/$b=". $a/$b; break;
              default:
                  echo "invalid operator"; break;
          }
      }
  </code></pre>
  
  <p>If I assume <code>$a=4</code> and <code>$b=2</code>
  but this give only value like this</p>
  
  <pre><code>6
  2
  8
  2
  </code></pre>
  
  <p>If I put , (comma) instead of . (dot) then it gives correct output like this</p>
  
  <pre><code>4+2=6
  4-2=2
  4*2=8
  4/2=2
  </code></pre>
  
  <p>Why does this happen?</p>