Error:
Warning: simplexml_load_file(): feed.rss:2393: parser error : xmlParseEntityRef: no name in C:\xampp\htdocs\mklbet\index.php on line 16
Warning: simplexml_load_file(): <title>We have a winner & it is ME</title> in C:\xampp\htdocs\mklbet\index.php on line 16
My problem is that when i use simplexml_load_file($url) - and the in the xml feed there is a '&' it will make an error - how can i get this to work?
if (file_exists($url)) {
$tips = simplexml_load_file($url);
} else {
exit('Failed to open stream');
}
foreach ($tips->channel->item as $entry) {
$title=htmlentities($entry->title);
}
}
This is how i wrote the code, i am getting the rss feed from another site so i cant edit the character