Replace MS Word single quotes in PHP:
function replaeQuotes($str)
{
$str1 = array(chr(145),chr(146), chr(147), chr(148), chr(151));
$str2 = array("'", "'",'"','"','-');
return str_replace($str1, $str2, $str);
}
For Ex:
In php,
$str="'This is TechniqZone'-For Developers";
$clearStr=replaeQuotes($str);
0 comments:
Post a Comment