1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-15 09:57:28 +01:00
openstamanager/templates/replace.php
2017-09-08 18:19:39 +02:00

17 lines
539 B
PHP

<?php
/**
* Sostituisce a delle stringhe ($nome_stringa$) i valori delle anagrafiche.
*/
$replaces = array_merge($replaces, (array) $custom);
foreach ($replaces as $key => $value) {
$replaces['$'.$key.'$'] = $value;
unset($replaces[$key]);
}
// Sostituisce alle variabili del template i valori
$head = str_replace(array_keys($replaces), array_values($replaces), $head);
$foot = str_replace(array_keys($replaces), array_values($replaces), $foot);
$report = str_replace(array_keys($replaces), array_values($replaces), $report);