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
  • 32,773
  • 9
  • 61
  • 91
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,217
  • 1
  • 19
  • 38