unexpected T_ELSEIF in
<p>I'm having a little problem at figuring this out:</p>

<pre><code>function myMenu() //Creates a menu with a class current to the current page item
{
    $menuItems = array (
        "Strona Głowna" =&gt; "index.php",
        "O nas" =&gt; "o-nas.php",
        "Oferta" =&gt; "oferta.php",
        "Polecane kierunki" =&gt; "polecane-kierunki.php",
        "kontakt" =&gt; "kontakt.php",
    );
    foreach($menuItems as $name =&gt; $url) {
        $class = 'default';
        $index = 'index.php';
            if ((curPageName() == $url) &amp;&amp; (curPageName() !== $index)) {
                $class='current';
            }
            echo "&lt;li&gt;&lt;a href='$url' class='$class'&gt;$name&lt;/a&gt;&lt;/li&gt;";
            elseif (curPageName() == $index) {
                $class='current home';
            }
            echo "&lt;li&gt;&lt;a href='$url' class='$class'&gt;$name&lt;/a&gt;&lt;/li&gt;";
        };
};
</code></pre>

<p>Basically I want to assign the 'current home' to the index.php ONLY.
Maybe you can come with better solutions, I'm a newbie at this. Anyway, this gives me:</p>

<pre><code>  PHP Parse error:  syntax error, unexpected T_ELSEIF in ...
</code></pre>

<p>Any help sorting this out appreciated!</p>

<p>Alex</p>
