Syntax error

I want to echo something inside <a></a> tags but can’t get it to display…

echo "<a href='http://www.example.co.uk" $row['id'] </a> . "<br />";

I get this error…

Parse error: syntax error, unexpected T_VARIABLE, expecting ‘,’ or ‘;’ in C:\Documents and Settings\Niall\My Documents\server\xampp\htdocs\foos\search.php on line 38

Can anyone help me please?

Perfect. Thanks again.

variable and string must connected by dot.

You missed a dot and are trying to output HTML while still in PHP mode. Try this:


echo "<a href='http://www.example.co.uk'>"  . $row['id']  . "</a><br />";