title: Using modulus operator in IF statement
body: <p>I am trying to use a modulus in my if statement, however I cannot get it working or find an example of this anywhere and it is not the same as in other languages I have done. So far ive tried</p>
  
  <pre><code>if ($counter % "10" = 2)
    {
      echo ($counter);
    echo "Have a good morning!";
    }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>if ($counter % 10 = 2)
    {
      echo ($counter);
    echo "Have a good morning!";
    }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>if (($counter % "10") = 2)
    {
      echo ($counter);
    echo "Have a good morning!";
    }
  </code></pre>
  
  <p>Yet still nothing is working, I am getting the error </p>
  
  <pre><code>Parse error: syntax error, unexpected '=' in H:\STUDENT\S0190204\GGJ\index.php on line 50
  </code></pre>
  
  <p>Although that is probably because the syntax is incorrect, if anyone could shed some light on this or point me in the direction of a site that shows a modulus used in an if statement in php Id appreciate it.
  Thank you </p>