can someone help me with this error? im trying to make a dynamic rss feed using php.. am i on the right track??
ERROR:
Parse error: syntax error, unexpected T_SL in C:\xampp\htdocs\Gacer\rss.php on line 27
<?php
$output = '<rss version="2.0"> <channel>';
$dbhost = '127.0.0.1';
$dbuser = 'root';
$dbpass = '';
$connect = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$connect){ die('Could not connect: ' . mysql_error()); }
$dbname = 'rss';
mysql_select_db($dbname);
//set the content type to xml
header("Content-Type: text/xml");
$sql = mysql_query("SELECT * FROM article LIMIT 10 ORDER BY id DESC");
?>
<title>Name of your site</title>
<description>A description of your site</description>
<link>http://geocities.com/jas_jo679</link>
<?php while($row = mysql_fetch_array($sql)){
$output .= <<<EOT ?>
<item>
<title><?php echo strip_tags($row['title']); ?></title>
<link><?php echo $row['link']; ?></link>
<description><?php echo htmlentities(strip_tags(substr($row['body'],0,600))); ?> </description>
</item>
<?php
EOT;
}
$output .= '</channel></rss>';
echo $output;
?>