/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? $string="Steve�s fix for MicroSux �Smart Quotes�"; print "Original |$string|<br>"; echo "Final " . fix_ms_smart_quotes($string) ."<br>"; function fix_ms_smart_quotes($string) { array("\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c", "\xe2\x80\x9d", "\xe2\x80\x93", "\xe2\x80\x94", "\xe2\x80\xa6"), $string); // Next, replace their Windows-1252 equivalents. $text); return $text; } ?>