Created
January 8, 2020 10:58
-
-
Save sidouglas/d62e6cb6a069924bde027f6460a715d9 to your computer and use it in GitHub Desktop.
Php String replace token
This file contains hidden or 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
//example $theString = '<hi>' => '<em>hi</em>' | |
<?=strtr($theString, ['<' => '<em>', '>' => '</em>'])?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment