title: How can I fix this if statement php?
body: <p>In my if statement, I have size and gender, look at my code. It cost a problem when my if statement doesn't need size but still need the gender. </p>
  
  <p>For some reason, my website will not detect the size of avatar somewhere, so I don't need the size at the end of this if statement, usually, I should use else when nothing is match to the if statement. </p>
  
  <p>However, I still need to emphasize the gender, what can I fix this problem? </p>
  
  <pre><code>&lt;?php
      if ($size &lt;= 48 &amp;&amp; $gender=='Female') $custom_avatar_size = '48';
      else if ($size &gt; 48 &amp;&amp; $size &lt;= 96 &amp;&amp; $gender=='Female') $custom_avatar_size = '96';
      else if ($size &gt; 96 &amp;&amp; $size &lt;= 128 &amp;&amp; $gender=='Female') $custom_avatar_size = '128';
      else if ($size &gt; 128 &amp;&amp; $size &lt;= 256 &amp;&amp; $gender=='Female') $custom_avatar_size = '256';
      else if ($size &lt;= 48 &amp;&amp; $gender=='Male') $custom_avatar_size = '1';
      else if ($size &gt; 48 &amp;&amp; $size &lt;= 96 &amp;&amp; $gender=='Male') $custom_avatar_size = '2';
      else if ($size &gt; 96 &amp;&amp; $size &lt;= 128 &amp;&amp; $gender=='Male') $custom_avatar_size = '3';
      else if ($size &gt; 128 &amp;&amp; $size &lt;= 256 &amp;&amp; $gender=='Male') $custom_avatar_size = '4';
      else if ($gender=='Female') $custom_avatar_size = '512';//problem is here
      else if ($gender=='Male') $custom_avatar_size = '5';//problem is here
  ?&gt;
  </code></pre>