Search found 2 matches
- Tue Sep 09, 2008 10:41 am
- Forum: PHP - Code
- Topic: Using strtr content ends up in improper place
- Replies: 1
- Views: 177
Re: Using strtr content ends up in improper place
I've updated my templateProcessor script to the following: <?php function load_template() { $template_file = "template.html"; $template = file_get_contents($template_file); $template_vars = array('{MAIN}', '{NAV}', '{TITLE}'); $template_vals = array(bodyContent(), navConten...
- Mon Sep 08, 2008 6:09 pm
- Forum: PHP - Code
- Topic: Using strtr content ends up in improper place
- Replies: 1
- Views: 177
Using strtr content ends up in improper place
Hello all, I'm creating a template engine to replace placeholder strings in my html template with dynamic content served by a function. To do this I have written the following template processor: function load_template() { $template_file = "template.html"; $template = fread(fopen($...