title: How can I make a PHP counter?
body: <p>I know I have done this in Javascript once, but how can I make it in PHP?
  Basically I want to do this:</p>
  
  <pre><code>if (empty($counter)){
     $counter = 1;
  }else{
     "plus one to $counter" ($counter++?)
  }
  </code></pre>
  
  <p>But it didn't work when I tried. How would I go about doing this? </p>
  
  <p>Thank you :)</p>
  
  <p>EDIT: This is so I can do:</p>
  
  <pre><code>if ($counter == 10){
     echo("Counter is 10!");
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>This is all in a "while()" so that I can count how many times it goes on, because LIMIT will not work for the query I'm currently doing.</p>