engine->getVariables(); if (!empty($founds [0])) { foreach ($founds [0] as $key => $found) { $foundvalue = str_replace('$V', '', $found); if (isset($variables [$foundvalue])) { if ($variables [$foundvalue] == 'null') { $formel = str_replace($found, 0, $formel); } else { if ($foundvalue == 'auflage') { $formel = str_replace($found, str_replace(',', '.', $variables [$foundvalue]), $formel); } else { if ($variables [$foundvalue] == '') { $formel = str_replace($found, 0, $formel); } else { $formel = str_replace($found, $variables [$foundvalue], $formel); } } } } else { $formel = str_replace($found, 0, $formel); } } } return $formel; } }