I have two files, template.txt and result.txt. The template has strings like #name1#, #name2#, #name3#... I need to replace this strings with result from sql (eg. alphabeticaly ordered names) and save it into new file result.txt. Does someone know how to do it? Is there any good example or working file that do similar thing? I thank you for help
$template = str_replace("#name1#", $name1, $template); $template = str_replace("#name2#", $name2, $template); $template = str_replace("#name3#", $name3, $template);