Jump to content

htmlentities() for RSS? I need an idea!


plodos

Recommended Posts

$notices = $_REQUEST['notices'];

if(!function_exists('XMLStrFormat'))
{
function XMLStrFormat($str){
       	    $str = str_replace("&", "&", $str);
	    $str = str_replace("<", "<", $str); 
    $str = str_replace(">", ">", $str); 
	    $str = str_replace("'", "'", $str);  
    $str = str_replace("\"", """, $str); 
	    $str = str_replace("\r", "", $str);
        return $str;
}
}
$a= XMLStrFormat($notices);

is it same with

$a = htmlentities($notices);

im trying to write RSS but it doesnt like html characters..

which way is better to save strings in MySQL for correct RSS format?

 

I checked http://tr2.php.net/htmlentities ... there are lots of different functions, I didnt understand the difference?

Link to comment
https://forums.phpfreaks.com/topic/134215-htmlentities-for-rss-i-need-an-idea/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.