Üzgünüm, ben doğru bir başlık oluşturmak için karıştı. Bu benim sorunum, ben bir TXT dosya var:
{{title}}<br />{{content}}
And this is the PHP file: I load file.txt and replace tags {{variable}} with value from $data['variable']
$data = array ( 'title' => 'Hello', 'content' => 'WORLD!!');
$file = file_get_contents("file.txt");
$key = array_keys($data);
$value = array_values($data);
$file = str_replace($key, $value, $file);
echo $file;
file.txt dan hiçbir şey değişmez
Ben bu formatta atama dizinin anahtarı ile bu çözmek için 2 yol var
'{{variable}}' => 'value'
veya yazmak
str_replace(array('{{','}}'),'',$file)
önce
echo $file;
Başka bir yolu var mı?
thx önce ...