Skip to content

Instantly share code, notes, and snippets.

@sidouglas
Created January 8, 2020 10:58
Show Gist options
  • Save sidouglas/d62e6cb6a069924bde027f6460a715d9 to your computer and use it in GitHub Desktop.
Save sidouglas/d62e6cb6a069924bde027f6460a715d9 to your computer and use it in GitHub Desktop.
Php String replace token
//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