0

I am writing a rss feed with php and mysql using PDO to get the info from the data base but am getting the following error:

Parse error: syntax error, unexpected  (T_CONSTANT_ENCAPSED_STRING) in /rss/rss.php on line 36

Line 36:

$data .= "<link>"'http://localhost/gmedia/video1.php?g=.$row['g_code'].'"</link>";   // line 36
Devon Bessemer
  • 34,461
  • 9
  • 69
  • 95
Kwooly
  • 9
  • 1

1 Answers1

0

You do not escape your string right. Read http://jason.pureconcepts.net/2013/05/fixing-php-errors/ for some tips.

Right way:

 $data .= "<link>http://localhost/gmedia/video1.php?g=".$row['g_code']."</link>";   // line 36
S.Visser
  • 4,645
  • 1
  • 22
  • 43