title: using regular expressions in if statement conditions
body: <p>i am trying to get a php if statement to have the rule where if a set variable equals "view-##" where the # signifies any number. what would be the correct syntax for setting up an if statement with that condition?</p>
  
  <pre><code>if($variable == &lt;&lt;regular expression&gt;&gt;){
      $variable2 = 1;
  }
  else{
      $variable2 = 2;
  }
  </code></pre>