title: php increment variable value with 1 when submit
body: <p>Hi I am new in php and started learning. I am trying to increment variable value with <strong>1</strong> when submit button is pressed.</p>
  
  <p>My Code:</p>
  
  <pre><code>&lt;?php
      $i=0;
      if($_POST['submit']){
          echo $i+1;  
      }
  ?&gt;
  </code></pre>
  
  <p>Thanks</p>