Created
July 15, 2015 20:25
-
-
Save rbk/7b7ad8ccbe8df3c5de9d to your computer and use it in GitHub Desktop.
Rbk ToolKit - Curly brace swap
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
function rbkCurlySwap($shortcodes,$string) { | |
foreach( $shortcodes as $key => $value ){ | |
$string = str_replace( '{{'.$key.'}}', $value, $string ); | |
} | |
return $string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment