Which of these would provide the most functionality?
Defining the templates within the variable:
elseif($global[action] == "edit_template") {
$template_content = template_get($_GET['template']);
$template_content = str_replace('\"', '"', $template_content);
$template_content = str_replace('</textarea>', '</textarea>', $template_content);
$template = db_get_array("templates","name='$_GET[template]'");
$output_template = template_get("Admin Edit Template");
}
or having them in the main script
$template_content = template_get($_GET['template']);
$template_content = str_replace('\"', '"', $template_content);
$template_content = str_replace('</textarea>', '</textarea>', $template_content);
In other words, is it better to cache all the templates at the top of the script or only once the needed action variable is called?