title: PHP if condition with strings
body: <p>I am trying to write would be a simple if condition. </p>
  
  <pre><code>function genderMatch($consumerid1, $consumerid2)
      {
      $gender1=getGender($consumerid1);
      $gender2=getGender($consumerid2);
      echo $gender1;
      echo $gender2;
      if($gender1=$gender2)   
        echo 1;
        return 1;
      else
         echo 0;
         return 0;
  }
  </code></pre>
  
  <p>The output of the getGender function is either a M or F. However, no matter what I do gender1 and gender2 are returned as the same. For example I get this output: <code>MF1</code></p>
  
  <p>I am currently at a loss, any suggestions?</p>