Question : Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runningp/public_html/members/test.php on line 42

hey guys,,, im going mad i just cant seem to find the error!!

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runningp/public_html/members/test.php on line 42

line 42 is:

<a class="links" href="http://www.runningprofiles.com/members/diary/show-month.php?yr={$row['year']}&mon={$dd}">{$row['month']}</a><br />
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
<table width="95%" class= "border2"  >
  <tr>
    <td>
<?php echo '<table width="100%">
 <tr>
 <td bgcolor="#ffffff">
	 <center> <b><u>Forum</u></b> </center>
</td>
</tr>';?>

<?
$i = 0;
while($row = mysql_fetch_assoc($result))
{
    $color = (($i%2 == 0) ? '#c7d8e1' : '#f1f4f6');

    echo "\n".'  
<tr bgcolor="'. $color .'">
  <td> 
		<center>
<a class="links" href="http://www.runningprofiles.com/members/diary/show-month.php?yr={$row['year']}&mon={$dd}">{$row['month']}</a><br />
</center>
</td>
  </tr>';

  $i++;
}

echo '
</table>';
?> 


</td>
  </tr>
</table>

Answer : Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runningp/public_html/members/test.php on line 42


Why brackets? You are forgetting the ' . '

So:



1:
<a class="links" href="http://www.runningprofiles.com/members/diary/show-month.php?yr={' . $row['year'] . '}&mon={' . $dd . '}">{' . $row['month'] . '}</a><br />
Random Solutions  
 
programming4us programming4us