0

I am trying to pass a sql row result as a key into an url.

I am getting the following error:

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in

with my php line :

 echo "<td>" . "<a href=\"viewDetails.php?"."$row['title']"."\>Betterdisplay</a>" . "</td>";
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
a-one
  • 103
  • 11

1 Answers1

1

You have made a small error in your string concatenation

echo "<td>" . "<a href=\"viewDetails.php?".$row['title']."\">Betterdisplay</a>" . "</td>";
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149