unexpected T_IF error in PHP
<p>I have a small problem with this code and i cannot understand why is returning <code>unexpected T_IF</code></p>

<p>code:</p>

<pre><code>$get_gender = array($getGender-&gt;getMaleGender());
$gender =  

if ($gender-&gt;getGender()) { 
    echo "Male"; 
} else { 
    echo "Female"; 
}
</code></pre>

<p>Any help is appreciated.</p>

<p>Solution:</p>

<pre><code>$get_gender = array($getGender-&gt;getMaleGender()); 
                if ($getGender-&gt;getIsMaleGender()) { 
                    $result = "Male"; 
                } else { 
                    $result = "Female";
                }
</code></pre>
