I’m grabbing a string from the database that could be something like String’s Title however I need to replace the ’ with a ' so that I can pass the string to an external API. I’ve used just about every variation of escaped strings in str_replace() that I can think of to no avail.
I’m grabbing a string from the database that could be something like String’s Title
Share
I have just tested this:
Edit: I believe that entries in your database have been
htmlentitiesed.Note: I’m pretty sure this is not a good solution, even though it did solve your problem I think there should be a better way to do it.