I'm creating an RSS feed using MySQL and PHP. Have everything working except the link structure. $rssfeed .= '<link>' . <a href="http://url/path.php?ID=$ID">$Title</a> . '</link>'; Code (markup): Can anyone provide a resource where I can learn to structure this correctly?
Hi po_taka, Thanks for that but I need to include the variable $ID in the link. Is this possible using htmlspecialchars? $rssfeed .= '<link>' . $ID . '</link>'; This works but goes to wrong destination $rssfeed .= '<link>' . (path)$ID . '</link>';
To explain a little better... Here's what I have: $rssfeed .= '<title>' . $Title . '</title>'; $rssfeed .= '<description>' . $Description . '</description>'; $rssfeed .= '<link>' . $ID . '</link>'; I'm trying to link <link> to URLs with this structure - http://www.url.com/View-This.php?ID=$ID Whereby $ID is inserted from the database. How would I include the relative path into the code below? $rssfeed .= '<link>' . $ID . '</link>';
It doesn't work because you got the syntax wrong. Try this: $rssfeed .= "<link><a href=\"http://url/path.php?ID=$ID\">$Title</a></link>"; PHP: