PHP not displaying text colour
<p>I have a page which I would like to see display the team played for in green. I have the following SQL:</p>

<pre><code>SELECT performance.id, matchid, playerid, team, debut, batpos, runs, ballsfaced, runs/ballsfaced*100 AS strikerate, fours, sixes, no, howout, fielder, bowler, ballsbowled, maidens, wickets, runsconceded, catches, stumpings, runouts, runsconceded/ballsbowled/6 AS economy, matches.round, matches.season, teams.id AS fteamid, a.id AS ateamid, teams.name AS hometeamname, a.name AS awayteamname, players.fname, players.surname 
                    FROM performance 
                    INNER JOIN matches ON performance.matchid=matches.id 
                    INNER JOIN teams ON matches.hometeam = teams.id 
                    INNER JOIN (SELECT teams.id, name FROM teams) AS a ON matches.awayteam = a.id
                    INNER JOIN players ON performance.playerid=players.id
</code></pre>

<p>And the following php statement:</p>

<pre><code>&lt;?php 
          //if they play for this team display in green
          if ($team['team'] == $team['fteamid']){
          ?&gt;
          &lt;font color="green"&gt;&lt;?php htmlout($team['hometeamname']); ?&gt;&lt;/font&gt;
          &lt;?php } else {
              ?&gt; &lt;?php htmlout($team['hometeamname']); ?&gt; 
              &lt;?php } ?&gt;
              v 
              &lt;?php 
          //if they play for this team display in green
          if ($team['team'] == $team['ateamid']){
          ?&gt;
          &lt;font color="green"&gt;&lt;?php htmlout($team['awayteamname']); ?&gt;&lt;/font&gt;
          &lt;?php } else {
              ?&gt; &lt;?php htmlout($team['awayteamname']); ?&gt; 
              &lt;?php } ?&gt;
</code></pre>

<p>It works fine for the home team, but it doesn't work for the away team and I can't figure out why, it appears to be correct to me. Can someone please point out my error?</p>
