Skip to content

Instantly share code, notes, and snippets.

@ljyf5593
Last active December 21, 2015 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljyf5593/6361884 to your computer and use it in GitHub Desktop.
Save ljyf5593/6361884 to your computer and use it in GitHub Desktop.
解决php无法解析中文引号的问题
<?php
str_replace(
array(' ','&nbsp;', '&amp;', '&quot;', '&#039;', '&ldquo;', '&rdquo;', '&mdash;', '&lt;', '&gt;', '&middot;', '&hellip;'),
array('∵',' ', '&', '"', "'", '“', '”', '—', '<', '>', '·', '…'),
$str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment