/ Published in: PHP
Find the tags {} and replace them by the value of the key in a array.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$str = "hola {all} todos {le} monde"; function replaceTag($str, $replace) { foreach($out[1] as $key => $value) { } } return $str; } echo replaceTag($str, $ar); // hola test todos {le} monde