Created
February 6, 2016 00:26
-
-
Save amcorreia/5607dac32fea4141d1c6 to your computer and use it in GitHub Desktop.
Convert smart single quotes to straight single quotes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function replace_curly_to_straight_quotes($str) { | |
return preg_replace("/[\x{2018}\x{2019}\x{201A}\x{203A}\x{201B}\x{2032}\x{2035}\x{2039}]/u", "'", $str); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment