Validate echo PHP
<p>Im trying to validate my output data from a php site that Im calling with </p>

<pre><code>&lt;?php include_once('nav.inc.php');
?&gt;
</code></pre>

<p>The thing is when Im using this code</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;&lt;a href="gb.php"&gt;GÄSTBOK&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="index.php"&gt;OM MIG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="portfolio.php"&gt;PORTFOLIO&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="cv.php"&gt;CURRICULUM VITAE&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I wont get any errors, But when Im trying with the other code I get alot of errors. Is there any way to write the code so It validates ? </p>

<p>This is the code thas bugging me</p>

<pre><code>&lt;?php 
$index = 'menu';
$gb = 'menu';
$portfolio = 'menu';
$cv = 'menu';
$menuLinkid=basename($_SERVER['PHP_SELF'],'.php');
if($menuLinkid=='index'){
$index = 'myButtons';
}else if($menuLinkid=='gb'){
        $gb ='myButtons';
}else if($menuLinkid=='portfolio'){
        $portfolio ='myButtons';
}else if($menuLinkid=='cv'){
$cv ='myButtons';
}
?&gt;

&lt;div id="fronticon"&gt;
&lt;a href="contact.php"&gt;&lt;img src="images/em.png" alt="Email" title="Email"/&gt;
&lt;/a&gt; 
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a class="&lt;?php echo $index; ?&gt; "href="index.php"&gt;OM MIG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="&lt;?php echo $gb; ?&gt; "href="gb.php"&gt;GÄSTBOK&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="&lt;?php echo $portfolio;?&gt; " href="portfolio.php"&gt;PORTFOLIO&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="&lt;?php echo $cv; ?&gt; "href="cv.php"&gt;CURRICULUM VITAE&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Thanks</p>
