Description PHP Replaces right side, and left side quotes and double quote characters with normal single and double quotes. Useful for interpreting text from a WYSIWYG editor, when someone has pasted content from Word.
<?php
function convert_smart_quotes($string) {
//converts smart quotes to normal quotes.
$search = array(chr(145), chr(146), chr(147), chr(148), chr(151));
$replace = array("'", "'", '"', '"', '-');
return str_replace($search, $replace, $string);
}
?>
No comments:
Post a Comment