I have a RSS reader on a web-page and the RSS it receives have links that contain "&" sign in them. For the page to be valid it needs to be changed to "&". I know this sounds stupid and unnecessary but I want to fix them.

Attached to this post is the PHP I use to get the RSS feed. Can someone help me modify it so i can have it change the "&" to "&"?

I barely know PHP and I don't know how to implement it.

You can use PHP's str_replace.

$filtered_link=str_replace('&','&',$link_string);

urlencode();

the edited line is 108

$page .= "<div class='rss-title'><a target='_blank' href=\"$link\">$title</a></div>";
$page .= "<div class='rss-title'><a target='_blank' href=\"".urlencode($link)."\">$title</a></div>";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.