title: PHP check value against multiple values with OR-operator
body: <p>I have a filename(<code>$fname</code>) and I need to assign <code>$pClass</code> to the file type with a "-" afterwards. Currently I always get <code>text-</code>, no matter what file type it is.</p>
  
  <pre><code>//This gets the extention for the file and assigns the class to the icon &lt;i&gt;
  $pieces = explode('.', $fname);
  $ext = array_pop($pieces);
  
  if($ext == (('txt')||('rtf')||('log')||('docx'))){
    $pClass = 'text-';
  }
  else if($ext == (('zip')||('sitx')||('7z')||('rar')||('gz'))){
    $pClass = 'archive-';
  }
  else if($ext == (('php')||('css')||('html')||('c')||('cs')||('java')||('js')||('xml')||('htm')||('asp'))){
    $pClass = 'code-';
  }
  else if($ext == (('png')||('bmp')||('dds')||('gif')||('jpg')||('psd')||('pspimage')||('tga')||('svg'))){
    $pClass = 'image-';
  }
  else {
    $pClass = '';
  }
  </code></pre>
  
  <p>Why doesn't my if statement with the OR operator works?</p>