$content) { $template = str_replace("%" . $name . "%", $content, $template); } return $template; } else { die('Cannot find template file «' . $file . '».'); } } function html_options($name, $options, $selected = "") { $html = ""; foreach ($options as $value => $label) $html .= ' ' . $label; return $html; } ?>