swamp Posted August 26, 2008 Share Posted August 26, 2008 Hey - how would I go about replacing ’ (slightly slanted apostrophe) With ' (normal apostrophe) ? I'm currently echoing $post from a database, but some articles have ’ in them instead of ' Thanks Link to comment https://forums.phpfreaks.com/topic/121383-apostrophes/ Share on other sites More sharing options...
gaza165 Posted August 26, 2008 Share Posted August 26, 2008 <? $str = "It’s my life, it’s now or never"; $str = str_replace("’", "'", $str); echo $str; ?> that will change "It’s my life, it’s now or never" to "It's my life, it's now or never" let me know if it works... G Link to comment https://forums.phpfreaks.com/topic/121383-apostrophes/#findComment-625841 Share on other sites More sharing options...
kenrbnsn Posted August 26, 2008 Share Posted August 26, 2008 Those are called "smart quotes". Take a look at this article Convert Smart Quotes with PHP Ken Link to comment https://forums.phpfreaks.com/topic/121383-apostrophes/#findComment-625843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.