tags:

views:

71

answers:

3

Edit: I have this line:

$comments = "http://www.kiubbo.com/index.php?action=comments&param=".$articles[$index]->getId();

And if I put it here it works out in the title tag, but not on the link or guid tags.

fwrite ($fp, "<item>\n");
fwrite ($fp, " <title>$title</title>\n");
fwrite ($fp, " <link>$comments</link>\n");
fwrite ($fp, "<guid>$comments</guid>\n");
fwrite ($fp, "</item>\n");
}
fwrite ($fp, "</channel></rss>\n");
fclose ($fp);

For some reason it takes out the "&param" part of the link ($comments).

Thanks everybody.

+1  A: 

If I;ve understood you correctly and your want the link to comments:

$comments = "YOUR_WEBSITE_HERE/index.php?action=comments&param=".$articles[$index]->getId();

you should probably also use <link rel="replies" for the link, every one loves semantics!

Hope that helps,

Phil

Phil Carter
Thanks it works, I just want also to embedded with the $title so when people click the title link they go directly to the comments page.Regards,
Slzr
+1  A: 

Could be your parser failing to error correct properly. You haven't, for instance, escaped your ampersands. Ask Feed Validator what is wrong.

If you want to write an XML file, use an XML tool, don't munge together strings.

David Dorward
A: 

Ok what I had wrong its I had to change: &

to: &

Thx everyone

Slzr