Hi, I have the following html code in a php file:
<!DOCTYPE html>
<html lang="{lang}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{Title}</title>
</head>
<body>
</body>
</html>
As you will see, I have some words between {lang}
or {Title}
.
I'm saving the php file in a variable:
$vdata = file_get_contents('path/archivo.php');
I have an array in the following way:
array(2) {
["lang"]=>
string(4) "es_ES"
["Title"]=>
string(7) "Mi Pagina Web"
}
How can I do the replacement?