unexpected T_VARIABLE error whilst setting up form validation
<p>i am trying to set up form validation but keep receiving <strong>Parse error: syntax error, unexpected T_VARIABLE on line 146</strong> whenever i try to load the page.</p>

<p>lines 133-153 of my code are    </p>

<pre><code>&lt;?php
    if (array_key_exists('submit',$_POST)){
    //set up layout
    echo '&lt;table width="100%" border="0" cellspacing="0" cellpadding="0" style="height: 140px;"&gt;
          &lt;tr&gt;
            &lt;td width="60%" valign="middle"&gt;&lt;a href="index.php"&gt;&lt;img src="resources/img/kite.png" alt="" width="250" height="101" border="0"/&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td width="40%" align="left" valign="middle"&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                &lt;/table&gt;
              &lt;/form&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;';
         // Fields that are on form
        $expected = array('name', 'email', 'comments');
        // Set required fields
        $required = array('name', 'comments');
        // Initialize array for errors
        $errors = array();
    exit;
    }
    ?&gt;
</code></pre>

<p>many thanks in advance!</p>
