-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 1 reply
- 8 views
-
- 3 answers
- 3,880 views
-
Google improves the way it shows search results when using quotes
By Chasethebase,
- google search
- (and 3 more)
- 2 replies
- 3 views
-
QNAP issues patch for an RCE security vulnerability affecting PHP in NAS Drive management
By Alap Naik Desai,
- remote code execution
- rce
- (and 12 more)
- 0 replies
- 10 views
-
Get this Dynamic 2022 Data & IT Security Training Bundle at 97% off
By News Staff,
- neowin deals
- cyber security
- (and 4 more)
- 0 replies
- 10 views
-
Question
Brian Miller
Using PHP, how would I convert the following:
to the following?
I “love” Newoin
Do you see the use of smart quotes?
I can do this in JS but I need to do this in PHP. In JS, I'd do something like...
$text = 'I "love" Newoin'; console.log($text.replace(/'/g, "’").replace(/\`/g, "’").replace(/\b"/g, "”").replace(/\"/g, "“"));
But I have no idea how to do this in PHP. Please help. Thanks.
Link to comment
https://www.neowin.net/forum/topic/1387562-php-convert-straight-quotes-to-smart-quotes/Share on other sites
4 answers to this question
Recommended Posts