Created
April 10, 2018 16:22
-
-
Save BenFausch/6fa0728e7c1fbdeb939c472420481878 to your computer and use it in GitHub Desktop.
multiple string replacements with php str_replace
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
//loops through each array by key, so $quotes[0] replaces $replace[0] | |
$quotes = ["\\'",'\\"']; | |
$replace = ["'",'"']; | |
$newsletter_article_html = str_replace($quotes, $replace, $newsletter_article_html); | |
return $newsletter_article_html; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment