I got this function to go trough a RSS feed and output the data.
function parseRSS($xml) {
$max = 6;
for($i=0; $i<$max; $i++) {
$url = $xml->channel->item[$i]->link;
$title = $xml->channel->item[$i]->title;
echo '<li><a href="'.$url.'">'.$title.'</a></li>';
}
}
For some reason, the $url outputs a domain like this: http:/www.domain.com/blabla
(notice the missing double // after http:)
I double checked the source and the links are alright there, just while outputting (for some reason) one slash is removed.
Anyone got a clue what causes this and how it can be solved? (I was thinking of using str_replace and replacing http:/ by http:// before echoing, anyone a clue on how to do that?)